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: unassig...@gcc.gnu.org ReportedBy: guoji...@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