[LLVMbugs] [Bug 10198] New: clang ignores -fno-operator-names when invoked with -c

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 26 15:06:53 PDT 2011


           Summary: clang ignores -fno-operator-names when invoked with -c
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bpfoley at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=6781)
 --> (http://llvm.org/bugs/attachment.cgi?id=6781)
Trivial reproducer; compile with clang -c -fno-operator-names

If a C++ program uses names such as 'and', 'xor', etc that collide with C++
reserved operator names, it won't compile unless you use the
-fno-operator-names command line option.

clang implements this option, but unfortunately when you invoke clang with -c,
the -fno-operator-names parameter isn't passed through to the compiler, and
instead prints the following warning, and fails to compile correctly.

clang: warning: argument unused during compilation: '-fno-operator-names'

The attached diff fixes this on trunk. Hopefully this is the right way to do it
and it can be applied directly.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list