This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/53920] New: "gcc -E" does not honor #pragma GCC diagnostic ignored "-Wunused-macro"
- From: "naesten at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Jul 2012 17:50:08 +0000
- Subject: [Bug preprocessor/53920] New: "gcc -E" does not honor #pragma GCC diagnostic ignored "-Wunused-macro"
- Auto-submitted: auto-generated
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.