From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-3 i686) Attempting to use the C++ option -fno-operator-names doesn't work. Testing on codesourcery's snapshot compiler reveals no problems. The code at issue is : #if defined(xor) #endif testing gives : xor.C:1:13: "defined" without an identifier for gcc-2.96-54 and xor.C:1:12: missing binary operator before '(' for gcc-2.96.69 Reproducible: Always Steps to Reproduce: 1. Try compiling above code fragment with g++ -fno-operator-names 2. 3. Actual Results: See above Expected Results: Compile correctly
This was a known issue in -69 and was fixed in -70. As I see since -72 -foperator-names is broken (the driver passes the switch to the new cpp which does only recognize -fno-operator-names). I've fixed this in my tree and the fix will appear in -75 (together with nice Neil's diagnostic for -foperator-names on your testcase: E.C:1:13: operator "defined" requires an identifier E.C:1:13: ("xor" is an alternative token for "^" in C++) ).
Should be fixed in cpp-2.96-75.