[Bug middle-end/48914] New: #pragma GCC diagnostic ignored "-Wc++0x-compat" doesn't work
bero at arklinux dot org
gcc-bugzilla@gcc.gnu.org
Fri May 6 09:40:00 GMT 2011
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: unassigned@gcc.gnu.org
ReportedBy: bero@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
More information about the Gcc-bugs
mailing list