Status: open Group: v1.0 (example) Created: Thu Jan 23, 2020 12:52 PM UTC by Petr Písař Last Updated: Thu Jan 23, 2020 12:52 PM UTC Owner: nobody Attachments:
nas-1.9.4 fails to build with GCC 10 due to a double global variable definition. An attached patch fixes it.
Thanks for the patch. At first glance it seems sensible, but I won't
have time for a closer look and testing before the weekend. Somebody else
might have; if so, please go ahead. :-)
Thanks,
Erik
--
La perfection est atteinte non quand il ne reste rien ajouter, mais quand il
ne reste rien à enlever.
-- Antoine de Saint-Exupéry
According to the lex & yacc and flex & bison books, using extern FILE *yyin is correct. Obviously, omitting extern worked since introducing the functionality in the year 2000. It still works with GCC versions less than 10.
I have tested the patch on Ubuntu 18.04.3 LTS with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0. The NAS server builds and parses the configuration with and without extern.
Note that using extern FILE *yyin can only be used with a non-reentrant scanner. The scanner used for parsing the NAS server configuration is non-reentrant.
I have applied the patch. Closing this bug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Petr,
On Thu, Jan 23, 2020 at 12:52:54PM -0000, Petr Písař wrote:
Thanks for the patch. At first glance it seems sensible, but I won't
have time for a closer look and testing before the weekend. Somebody else
might have; if so, please go ahead. :-)
Thanks,
Erik
--
La perfection est atteinte non quand il ne reste rien ajouter, mais quand il
ne reste rien à enlever.
-- Antoine de Saint-Exupéry
Related
Bugs:
#7According to the lex & yacc and flex & bison books, using
extern FILE *yyinis correct. Obviously, omittingexternworked since introducing the functionality in the year 2000. It still works with GCC versions less than 10.I have tested the patch on Ubuntu 18.04.3 LTS with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0. The NAS server builds and parses the configuration with and without
extern.Note that using
extern FILE *yyincan only be used with a non-reentrant scanner. The scanner used for parsing the NAS server configuration is non-reentrant.I have applied the patch. Closing this bug.