[Bug c++/53215] Warn if orphaned memory is created by ignoring return value of new
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Sep 8 02:50:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53215
--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
Not that I really know C++ that well, but maybe the builtin operator new could
simply be marked with __attribute__((warn_unused_result)) or whatever the C++
equivalent is? I dunno...
More information about the Gcc-bugs
mailing list