public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-27 18:50 ` pinskia at gcc dot gnu.org
  2021-08-27 18:51 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27 18:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wipedout at yandex dot ru

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 77299 has been marked as a duplicate of this bug. ***

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

* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
  2021-08-27 18:50 ` [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null pinskia at gcc dot gnu.org
@ 2021-08-27 18:51 ` pinskia at gcc dot gnu.org
  2021-11-21 14:54 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27 18:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
  2021-08-27 18:50 ` [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null pinskia at gcc dot gnu.org
  2021-08-27 18:51 ` pinskia at gcc dot gnu.org
@ 2021-11-21 14:54 ` pinskia at gcc dot gnu.org
  2021-11-21 17:05 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-21 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fchelnokov at gmail dot com

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 103347 has been marked as a duplicate of this bug. ***

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

* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-11-21 14:54 ` pinskia at gcc dot gnu.org
@ 2021-11-21 17:05 ` redi at gcc dot gnu.org
  2021-11-22  9:25 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-11-21 17:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2021-08-27 00:00:00         |2021-11-21

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
An intereting case from PR 103347 where the pedwarn about the NSDMI is
suppressed because GCC thinks the initializer is in a system header:

#include <cstddef>
struct test {
    void *x = NULL; //invalid in C++03 mode
};
int main() {}

This should be rejected with -pedantic-errors, but g++ is silent unless you
also add -Wsystem-headers.

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

* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-11-21 17:05 ` redi at gcc dot gnu.org
@ 2021-11-22  9:25 ` redi at gcc dot gnu.org
  2021-11-22  9:41 ` pinskia at gcc dot gnu.org
  2021-11-22  9:45 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-11-22  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #13)
> An intereting case from PR 103347 where the pedwarn about the NSDMI is
> suppressed because GCC thinks the initializer is in a system header:
> 
> #include <cstddef>
> struct test {
>     void *x = NULL; //invalid in C++03 mode
> };
> int main() {}
> 
> This should be rejected with -pedantic-errors, but g++ is silent unless you
> also add -Wsystem-headers.

And this is a regression, because 4.8 silently accepts this code in C++98 mode,
whereas 4.7 warns about it as expected:

null.C:3:15: warning: non-static data member initializers only available with
-std=c++11 or -std=gnu++11 [enabled by default]

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

* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-11-22  9:25 ` redi at gcc dot gnu.org
@ 2021-11-22  9:41 ` pinskia at gcc dot gnu.org
  2021-11-22  9:45 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-22  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |9.1.0
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the original issue with -Wzero-as-null-pointer-constant is fixed in GCC 9
by r9-873. The system header issue is now listed as PR 77299.

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

* [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null
       [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-11-22  9:41 ` pinskia at gcc dot gnu.org
@ 2021-11-22  9:45 ` redi at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-11-22  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.0
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=77299

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

end of thread, other threads:[~2021-11-22  9:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-77513-4@http.gcc.gnu.org/bugzilla/>
2021-08-27 18:50 ` [Bug c++/77513] -Wzero-as-null-pointer-constant vs 0, nullptr, NULL and __null pinskia at gcc dot gnu.org
2021-08-27 18:51 ` pinskia at gcc dot gnu.org
2021-11-21 14:54 ` pinskia at gcc dot gnu.org
2021-11-21 17:05 ` redi at gcc dot gnu.org
2021-11-22  9:25 ` redi at gcc dot gnu.org
2021-11-22  9:41 ` pinskia at gcc dot gnu.org
2021-11-22  9:45 ` redi at gcc dot gnu.org

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