[Bug c++/69922] [6 Regression] Bogus -Wnonnull-compare for: ... ? static_cast<T*>(this) : nullptr
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 24 12:08:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69922
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 37780
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37780&action=edit
gcc6-pr69922.patch
Well, setting TREE_NO_WARNING on the spot where the C++ FE adds the artificial
compares is not that hard, I think I've spotted all (not 100% sure about
nonnull attribute pointer to members).
But there is a major problem that the TREE_NO_WARNING flag should survive
folding, and I'm not sure what to do there.
More information about the Gcc-bugs
mailing list