From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9185 invoked by alias); 26 Dec 2012 02:45:40 -0000 Received: (qmail 9132 invoked by uid 48); 26 Dec 2012 02:45:25 -0000 From: "guojiufu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55810] New: pedantic-errors can not show message for redefined macros in system_header Date: Wed, 26 Dec 2012 02:45: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: guojiufu at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-12/txt/msg02327.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55810 Bug #: 55810 Summary: pedantic-errors can not show message for redefined macros in system_header Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: guojiufu@gmail.com Referenced from Bug 16358 and 55602. If there is "#pragma GCC system_header", it silently overwrites the previous defined macro. -pedantic-errors can not help. --a.h -- #pragma GCC system_header #define A 1 #define A 2 -----a.c---- #include "a.h" int main(){ return A; } ------------ gcc a.c -pedantic-errors