[LLVMbugs] [Bug 13548] New: #pragma clang diagnostic push ignores garbage at end of line without warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 7 16:09:39 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13548

             Bug #: 13548
           Summary: #pragma clang diagnostic push ignores garbage at end
                    of line without warning
           Product: clang
           Version: 3.1
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tom+bugzilla at omnigroup.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


I blithely wrote the following code:

#pragma clang diagnostic push ignored "-Wdeprecated-declarations"

Which should not be expected to work, nor is it documented to. Owing to a
mental scotoma I could not comprehend why deprecated-declaration warning
continued to be issued.
As it happens you can put nigh anything at the end of the line and the compiler
will silently ignore it.

If the compiler had warned about the garbage, it would have saved me some
mental anguish. Perhaps we need to add -Wextra-stuff-at-end-of-pragma. Or
perhaps we don't need to make that one optional.

-- 
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