Bug 26457 - -fno-operator-names is broken
Summary: -fno-operator-names is broken
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-07 13:22 UTC by John Levon
Modified: 2007-04-18 16:31 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-02-07 15:27:51 UTC
Embargoed:


Attachments (Terms of Use)

Description John Levon 2001-02-07 13:22:51 UTC
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

Comment 1 Jakub Jelinek 2001-02-07 15:27:46 UTC
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++)
).

Comment 2 Jakub Jelinek 2001-02-14 13:27:45 UTC
Should be fixed in cpp-2.96-75.


Note You need to log in before you can comment on or make changes to this bug.