[LLVMbugs] [Bug 1966] New: -pedantic-errors unusable

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jan 31 05:23:41 PST 2008


           Summary: -pedantic-errors unusable
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: NetBSD
            Status: NEW
          Severity: major
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: neil at daikokuya.co.uk
                CC: llvmbugs at cs.uiuc.edu

Clang defines macros indicating it is GCC, so it pulls in GCC-specific
declarations in system header files.

However, it then rejects them with stuff like:

/usr/include/sys/cdefs_aout.h:26:5: error: extension used
    __asm(".global " _C_LABEL_STRING(#alias) "\n"                       \

This makes -pedantic-errors not useful for real code.

It should either

a) not claim to be GCC in pedantic-errors mode, or
b) accept this stuff in system headers even with --pedantic-errors

Note that in this example there is no need to reject the __asm construct at all
as it is an identifier reserved for the implementation.

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