From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21537 invoked by alias); 26 May 2015 12:06:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 21352 invoked by uid 48); 26 May 2015 12:06:35 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66290] New: wrong location for -Wunused-macros Date: Tue, 26 May 2015 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg02126.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66290 Bug ID: 66290 Summary: wrong location for -Wunused-macros Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: manu at gcc dot gnu.org Target Milestone: --- /* { dg-do compile } */ /* { dg-options "-E -Wunused-macros" } */ #define BAR #define FOO manuel@gcc14:~/test2$ ./223651/build/gcc/cc1 -Wunused-macros pragma-diag-4.c pragma-diag-4.c:4:0: warning: macro "FOO" is not used [-Wunused-macros] #define FOO ^ pragma-diag-4.c:3:0: warning: macro "BAR" is not used [-Wunused-macros] #define BAR ^ Not perfect, but ok. manuel@gcc14:~/test2$ ./223651/build/gcc/cc1plus -Wunused-macros pragma-diag-4.c pragma-diag-4.c:1:0: warning: macro "FOO" is not used [-Wunused-macros] /* { dg-do compile } */ ^ pragma-diag-4.c:1:0: warning: macro "BAR" is not used [-Wunused-macros] Terrible!