Re: CPP inconsistency

2005-04-19 Thread Zack Weinberg
Joe Buck <[EMAIL PROTECTED]> writes: > GCC has the "suggest parentheses" warning elsewhere (to catch people > writing "if (foo = 0)" and the like; maybe there should be a warning > for this one as well. I'd be happy to take a patch to add -Wparentheses support to libcpp/expr.c. zw

Re: CPP inconsistency

2005-04-19 Thread Joe Buck
On Tue, Apr 19, 2005 at 03:28:07PM +0200, Etienne Lorrain wrote: > > #define OPTION1 0x0001 > > #define OPTION2 0x0002 > > #define OPTION3 0x0004 > > #define OPTION4 0x0008 > > #define CONFIGURATION (OPTION1 | OPTION3) > > // There is the problem: the "== 0" is ignored > > #if CONFIGURATION & OPT

Re: CPP inconsistency

2005-04-19 Thread Daniel Jacobowitz
On Tue, Apr 19, 2005 at 03:28:07PM +0200, Etienne Lorrain wrote: > Hi, > > Just a minor thing, but I hit this problem times to times, I know > the CPP preprocessor has no warning like "end of line ignored"... > GCC-3.3.5 and 3.4.3. This is just order of operations. > [EMAIL PROTECTED]:~/pr

CPP inconsistency

2005-04-19 Thread Etienne Lorrain
Hi, Just a minor thing, but I hit this problem times to times, I know the CPP preprocessor has no warning like "end of line ignored"... GCC-3.3.5 and 3.4.3. [EMAIL PROTECTED]:~/projet$ cat > tmp.c #define OPTION1 0x0001 #define OPTION2 0x0002 #define OPTION3 0x0004 #define OPTION4 0x0008 #