Bug 26457 - -fno-operator-names is broken
-fno-operator-names is broken
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  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:
Last Closed: 2001-02-07 10:27:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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)

testing gives :

xor.C:1:13: "defined" without an identifier

for gcc-2.96-54


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

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.