Bug 26457 - -fno-operator-names is broken
-fno-operator-names is broken
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-07 08:22 EST by John Levon
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-07 10:27:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Levon 2001-02-07 08:22:51 EST
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 10:27:46 EST
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 08:27:45 EST
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.