https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66839
Bug ID: 66839 Summary: g++ accepts NSDMI with -std=c++98 when the intializer is a macro defined in a standard header Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ensadc at mailnesia dot com Target Milestone: --- The following code compiles with no warnings or errors even with `-std=c++98 -pedantic-errors` on. ==================== #include <stddef.h> struct A { char* p = NULL; }; int main() {} ==================== The following is corrctly rejected. ==================== #define NULL 0 struct A { char* p = NULL; }; int main() {} ====================