This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/53920] New: "gcc -E" does not honor #pragma GCC diagnostic ignored "-Wunused-macro"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53920

             Bug #: 53920
           Summary: "gcc -E" does not honor #pragma GCC diagnostic ignored
                    "-Wunused-macro"
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: naesten@gmail.com


iMac:gcc-bugs user$ cat cpp-pragma-GCC-diagnostic.c

#pragma GCC diagnostic ignored "-Wunused-macros"
#define FOO

iMac:gcc-bugs user$ gcc-fsf-4.7 -Wunused-macros cpp-pragma-GCC-diagnostic.c -E
# 1 "cpp-pragma-GCC-diagnostic.c"
# 1 "<command-line>"
# 1 "cpp-pragma-GCC-diagnostic.c"

#pragma GCC diagnostic ignored "-Wunused-macros"
cpp-pragma-GCC-diagnostic.c:3:0: warning: macro "FOO" is not used
[-Wunused-macros]
iMac:gcc-bugs user$ gcc-fsf-4.7 --version
gcc-fsf-4.7 (GCC) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]