[Bug c++/57111] Generalize -Wfree-nonheap-object to delete
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 3 22:56:53 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #13 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #12)
> (In reply to Martin Sebor from comment #11)
> > It detects the bug in the test case in comment #0 but only with optimization
> > (to see through inlined calls) and with -Wsystem-headers.
>
> This seems like a warning that should not be suppressed in system headers.
>
> Diagnostic pragmas could be added to system headers to suppress false
> positives.
I agree. I thought it was due to an omission on my part but after checking I
see that the code does jump through all the necessary hoops to trigger even in
system headers, so it's a bug that it doesn't. Let me see what's going on.
More information about the Gcc-bugs
mailing list