http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48914
Summary: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: b...@arklinux.org $ cat test.cpp #pragma GCC diagnostic ignored "-Wc++0x-compat" namespace std { class nullptr_t { }; } extern std::nullptr_t nullptr; $ g++ -Wc++0x-compat -c test.cpp test.cpp:5:1: warning: identifier ‘nullptr’ will become a keyword in C++0x [-Wc++0x-compat] $ g++ -Wc++0x-compat -Werror -c test.cpp test.cpp:5:1: error: identifier ‘nullptr’ will become a keyword in C++0x [-Werror=c++0x-compat] cc1plus: all warnings being treated as errors