[Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well

2020-05-27 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354 --- Comment #5 from Haoxin Tu --- (In reply to Jonathan Wakely from comment #4) > (In reply to Haoxin Tu from comment #3) > > I see. Are there any cases that can trigger the UB of nonnull-attribute? I > > doubt the usage of “-fsanitize=nonnull-at

[Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well

2020-05-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354 --- Comment #4 from Jonathan Wakely --- (In reply to Haoxin Tu from comment #3) > I see. Are there any cases that can trigger the UB of nonnull-attribute? I > doubt the usage of “-fsanitize=nonnull-attribute” in GCC... Yes, just use the attribut

[Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well

2020-05-27 Thread haoxintu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354 --- Comment #3 from Haoxin Tu --- I see. Are there any cases that can trigger the UB of nonnull-attribute? I doubt the usage of “-fsanitize=nonnull-attribute” in GCC...

[Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well

2020-05-27 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354 --- Comment #2 from Jonathan Wakely --- Allowing the attribute on individual parameters might be nice though. I hate the fact that for C++ member functions the first parameter is the implicit 'this' pointer which always has to be non-null anyway

[Bug c++/95354] GCC misuse "nonnull-attribute" option and can not detect it as UB as well

2020-05-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95354 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED