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

* [Bug c++/66839] g++ accepts NSDMI with -std=c++98 when the intializer is a macro defined in a standard header
  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 ` pinskia at gcc dot gnu.org
  2021-12-01  2:51 ` ensadc at mailnesia dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-05  3:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66839

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-08-05
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/66839] g++ accepts NSDMI with -std=c++98 when the intializer is a macro defined in a standard header
  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
  1 sibling, 0 replies; 3+ messages in thread
From: ensadc at mailnesia dot com @ 2021-12-01  2:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66839

ensadc at mailnesia dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #3 from ensadc at mailnesia dot com ---
Seems to be fixed by r12-5488

*** This bug has been marked as a duplicate of bug 103347 ***

^ 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).