[Bug c/30368] missing warning for dereferencing null pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30368 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=16351 --- Comment #10 from Eric Gallager --- (In reply to Jeffrey A. Law from comment #8) > The plan for 16351 would be to catch in gimple-ssa-isolate-paths.c, but that > won't catch this instance because of the wrapping ADDR_EXPR. > > Regardless, while related, this is not, IMHO a dup of 16351 putting it under "See Also" then
[Bug c/30368] missing warning for dereferencing null pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30368 Martin Sebor changed: What|Removed |Added Keywords||diagnostic CC||msebor at gcc dot gnu.org Last reconfirmed|2007-03-13 16:12:46 |2020-5-18 --- Comment #9 from Martin Sebor --- Missing warning reconfirmed with GCC 11. The last pass where the null pointer is still available is the CCP1 pass whose output shows that it removes it: $ gcc -O2 -S -Wall -Wextra -fdump-tree-ccp1-all=/dev/stdout pr30368.c ... Substituting values and folding statements Folding statement: _1 = _3->b; Folded into: _1 = 0B; Folding statement: if (_1 != 0B) ... So it should be possible to diagnose the dereference there, just prior to its removal.
[Bug c/30368] missing warning for dereferencing null pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30368 Jeffrey A. Law law at redhat dot com changed: What|Removed |Added Status|RESOLVED|NEW CC||law at redhat dot com Resolution|DUPLICATE |--- --- Comment #8 from Jeffrey A. Law law at redhat dot com --- The plan for 16351 would be to catch in gimple-ssa-isolate-paths.c, but that won't catch this instance because of the wrapping ADDR_EXPR. Regardless, while related, this is not, IMHO a dup of 16351
[Bug c/30368] missing warning for dereferencing null pointer
--- Comment #6 from manu at gcc dot gnu dot org 2007-03-13 16:12 --- So the conclusion is that we should emit a warning for the undefinedness. -- manu at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-03-13 16:12:46 date|| Summary|wrong result|missing warning for ||dereferencing null pointer http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30368
[Bug c/30368] missing warning for dereferencing null pointer
--- Comment #7 from manu at gcc dot gnu dot org 2007-03-13 16:22 --- and as such, this is a duplicate of bug 16351. *** This bug has been marked as a duplicate of 16351 *** -- manu at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30368