[Bug c++/98753] -Wfree-nonheap-object on Bison generated code
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 19 20:55:37 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2021-01-19
Ever confirmed|0 |1
CC| |msebor at gcc dot gnu.org
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
The attached file depends on a number of headers. To reproduce a problem we
need a standalone test case that can be compiled on its own. One way to do
that is to use the -E option to GCC to obtain the translation unit and
attaching that.
That said, based on the description I suspect the warning is a false positive
with the same root cause as pr54202. Until a better solution is available in
GCC the workaround is to suppress the warning, either by #pragma GCC
diagnostic, or by using -Wno-free-nonheap-object on the command line.
More information about the Gcc-bugs
mailing list