[Bug c++/56373] -Wzero-as-null-pointer-constant: does not catch issues with smart pointers
akim.demaille at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 18 13:23:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56373
--- Comment #4 from Akim Demaille <akim.demaille at gmail dot com> 2013-02-18 13:23:08 UTC ---
> If you're smart enough to know the object isn't used then don't create it :)
:) :) :)
> ~shared_ptr() has non-trivial side-effects, the compiler isn't smart enough to
> determine they won't fire when its empty, so it's always meaningful.
I had in mind providing the library authors with an attribute that would
help them influence this diagnostic.
More information about the Gcc-bugs
mailing list