[llvm-bugs] [Bug 28901] New: -Wexpansion-to-defined enabled without -pedantic

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 8 02:12:41 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28901

            Bug ID: 28901
           Summary: -Wexpansion-to-defined enabled without -pedantic
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bonzini at gnu.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Macros that expand to "defined" are undefined behavior according to the C
standard, but clang, as a language extension, is implementing it by always
treating "defined" as the preprocessor operator.

While it is a good idea to add a separate warning flag for
-Wexpansion-to-defined, it should only be enabled by default if -pedantic or
perhaps -Wextra (and of course -Weverything) is provided.  It should not be
enabled by -Wall.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160808/ca36a561/attachment.html>


More information about the llvm-bugs mailing list