[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Last

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Status|RESOLVED

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 --- Comment #8 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #6) > Yes, that makes sense to me as an explanation of the limitation of the GCC > implementation and a solution/workaround for it. I don't think it's >

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 --- Comment #7 from Jakub Jelinek --- Different warnings are simply done at different compilation phases. This is similar to how you get only a subset of FE warnings on uninstantiated templates, only something can be warned reliably at that

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 --- Comment #6 from Martin Sebor --- Yes, that makes sense to me as an explanation of the limitation of the GCC implementation and a solution/workaround for it. I don't think it's something users unfamiliar with GCC internals think of, though.

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 --- Comment #5 from Jakub Jelinek --- You can always use -fkeep-inline-functions to get the warning even for unused inlines (by forcing them to be emitted). -Wnonnull-compare isn't the only warning that isn't performed in the FEs early, think

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 --- Comment #3 from Martin Sebor --- I should add that Clang issues the warning for all three functions: $ /build/llvm-trunk/bin/clang -S -Wall -Wextra -Wpedantic z.C z.C:2:21: warning: 'this' pointer cannot be null in well-defined C++ code;

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 Manuel López-Ibáñez changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c++/77298] -Wnonnull-compare only emitted for code which is invoked

2016-08-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #2