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...