[Bug c++/98753] -Wfree-nonheap-object on Bison generated code

2021-01-20 Thread foss at grueninger dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 --- Comment #6 from Christoph --- Sorry for not providing the command line argument and the new output. > gcc-11 -std=c++17 cmCommandArgumentParser_complete.cxx cmCommandArgumentParser.cxx: In function ‘int cmCommandArgument_yyparse(yyscan_t)’:

[Bug c++/98753] -Wfree-nonheap-object on Bison generated code

2021-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 --- Comment #5 from Martin Sebor --- I can't reproduce the warning with the default options. There are just two calls to free() in the dump. In each instance its argument resolves to the yymsg pointer and not to the yyssa array as in the warnin

[Bug c++/98753] -Wfree-nonheap-object on Bison generated code

2021-01-19 Thread foss at grueninger dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 --- Comment #4 from Christoph --- Created attachment 50010 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50010&action=edit C++ file generated by Bison run with -E Including all dependencies, created by GCC 11 with added -E

[Bug c++/98753] -Wfree-nonheap-object on Bison generated code

2021-01-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 --- Comment #3 from Richard Biener --- The issue is that we isolate a path that is impossible to take but on that path we have p = &foo; free (p); and thus a "proved" mistake. But in reality it is guarded by an effective if (false) condition. S

[Bug c++/98753] -Wfree-nonheap-object on Bison generated code

2021-01-19 Thread akim.demaille at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 Akim Demaille changed: What|Removed |Added CC||akim.demaille at gmail dot com --- Comme

[Bug c++/98753] -Wfree-nonheap-object on Bison generated code

2021-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|