‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object]

2021-01-18 Thread Christoph Grüninger
Dear Bison community, while compiling CMake using GCC 11 (not yet released), I came across several -Wfree-nonheap-object warnings. They came from a file generated by GNU Bison 3.4.2. [1] I was hoping the error might be fixed in a newer version, so 1. I downloaded your latest release 3.7.4 2. R

Re: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object]

2021-01-18 Thread Christoph Grüninger
Hi Akim, thanks for sharing your thoughts! Being in charge is kind of a stretch for an open source project like CMake. You can write a patch, open an issue yourself, or I can try to take your advice and create a merge request. https://gitlab.kitware.com/cmake Bye Christoph Am 19.01.21 um 06:

Re: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object]

2021-01-18 Thread Christoph Grüninger
Hi Akim, thank you for having a look and extracting the relevant code. GCC 11 is wrong (together with myself); I am going to open a GCC 11 bug tonight. Let us hope they will fix is before their release in April or March, then Paul don't need to figure out how to work around this in Bison. 2.

Re: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object]

2021-01-19 Thread Christoph Grüninger
Just for reference, I opened GCC Bug 98753, cf. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98753 Bye Christoph

Unused attribute for used variable

2021-01-26 Thread Christoph Grüninger
Dear Bisons! I am still giving CMake's Bison code some love. I regenerated the code using Bison 3.7.4. But Clang 11 with manually set -Wused-but-marked-unused warns: > [ 56%] Building CXX object > Source/CMakeFiles/CMakeLib.dir/LexerParser/cmFortranParser.cxx.o > cmExprParser.cxx:774:54: warning

Re: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object]

2021-01-26 Thread Christoph Grüninger
improving the y file. Thanks! Christoph Am 20.01.21 um 06:14 schrieb Akim Demaille: > Hi Christoph, > >> Le 19 janv. 2021 à 08:27, Christoph Grüninger a écrit : > >>> 3. I removed the lines 1717 and 1745 as the label yyerrlab1 must be defined. >>> Could you

Resolving shift/reduce conflicts?

2021-02-01 Thread Christoph Grüninger
Dear Bisons, I have another issue within the CMake parser code. When using the attached cmDependsJavaParser.y with Bison 3.7.5, i get the following warning: 4 shift/reduce conflicts [-Wconflicts-sr]. When adding -Wcounterexamples I get the output below. Ok, I understand the issue and Bison is righ

Re: Resolving shift/reduce conflicts?

2021-02-05 Thread Christoph Grüninger
Hi Hans, Evan, Zartaj, thank you for all the helpful comments! I made some minor clean ups, but I don't feel confident enough to upstream them. I played around with semicolons rules as you advised, and I could see some effect: I ended up having more conflicts :-) I think the problem is too big for