Re: -Wextra and enumerator/non-enumerator in conditional expressions

2007-04-09 Thread Jim Wilson
Ching, Jimen (US SSA) wrote: According to the manual, I should be getting a warning, but I don't. Did I misunderstand the manual? A conditional expression, as per the ISO C/C++ standards, is an expression of the form (A ? B : C). There is no conditional expression in your testcase. Also, i

-Wextra and enumerator/non-enumerator in conditional expressions

2007-04-04 Thread Ching, Jimen \(US SSA\)
Hi all, I'm using g++ 4.1.1 under Fedora Core 5 on an Intel system. I'm compiling the following code with "g++ -Wextra tst.cpp". enum my_enum { FOO = 10, BAR, BAZ }; int main() { my_enum e = BAR; while (e == 15); for (;e == 15;);