[Bug c++/95589] missing warning initializing a reference with a dereferenced null

2021-08-13 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95589

Eric Gallager  changed:

   What|Removed |Added

   Last reconfirmed||2021-08-13
 CC||egallager at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #2 from Eric Gallager  ---
Confirmed.

[Bug c++/95589] missing warning initializing a reference with a dereferenced null

2020-06-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95589

Martin Sebor  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=84316
 Blocks||86172
   Keywords||diagnostic

--- Comment #1 from Martin Sebor  ---
I was about to classify this as an enhancement but after reading the
description of -Wnull-dereference in the manual ("compiler detects paths that
trigger erroneous or undefined behavior due to dereferencing a null pointer")
I'm inclined to view it as a bug.  The code is clearly in error, GCC just
doesn't detect it (even though the "doesn't detect it" part could be used to
argue the warning works strictly as documented).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86172
[Bug 86172] [meta-bug] issues with -Wnull-dereference