help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Christoph Grüninger
Subject: Re: ‘void free(void*)’ called on unallocated object ‘yyssa’ [-Wfree-nonheap-object]
Date: Tue, 19 Jan 2021 08:27:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

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-generated the file cmCommandArgumentParser.y with
     bison --yacc --name-prefix=cmCommandArgument_yy 
--defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx 
cmCommandArgumentParser.y

It makes little sense to use --yacc while using Bison features.  Why
would you do that?  Bison generates warnings for Bison features used
in Yacc mode.

I just followed the how-to from CMake. I will update it accordingly.

3. I removed the lines 1717 and 1745 as the label yyerrlab1 must be defined.

Could you please clarify what you are doing here, and why?

The lines contained an #if 0 / #endif that hid the label "yyerrlab1:" from the compiler. When compiling it the compiler complained that in line 1362 "goto yyerrlab1;" used an undefined label. That's also described in the first line of the .y file.
Could handle this differently?

Bye
Christoph

--
Als wär es nix, leb' ich von [IT] und mach' nur, was ich lieb'
Lebe wie im Paradies, womit hab' ich das verdient?
Die Wahrheit ist: Hab' ich nicht, ich bin nur reicher beschenkt
Als jemand in einem armen Land mit dem gleichen Talent
[frei nach Tua von Die Orsons - Oioioiropa]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]