public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66839] New: g++ accepts NSDMI with -std=c++98 when the intializer is a macro defined in a standard header
@ 2015-07-11 14:37 ensadc at mailnesia dot com
2021-08-05 3:48 ` [Bug c++/66839] " pinskia at gcc dot gnu.org
2021-12-01 2:51 ` ensadc at mailnesia dot com
0 siblings, 2 replies; 3+ messages in thread
From: ensadc at mailnesia dot com @ 2015-07-11 14:37 UTC (permalink / raw)
To: gcc-bugs
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() {}
====================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-01 2:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11 14:37 [Bug c++/66839] New: g++ accepts NSDMI with -std=c++98 when the intializer is a macro defined in a standard header ensadc at mailnesia dot com
2021-08-05 3:48 ` [Bug c++/66839] " pinskia at gcc dot gnu.org
2021-12-01 2:51 ` ensadc at mailnesia dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).