[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix compile error with flex version 2.5.38 and above
From: |
Bernd Edlinger |
Subject: |
[PATCH] Fix compile error with flex version 2.5.38 and above |
Date: |
Mon, 1 Dec 2014 20:44:13 +0100 |
Hello,
I noticed, that bison does no longer compile with flex 2.5.38 and above.
That is because flex 2.5.38 changed the place where the YY_USER_INIT
is evaluated. Previously it was evaluated after code_start is declared, but
now it is evaluated before code_start is declared:
CC src/bison-scan-gram-c.o
In file included from ../bison-3.0.2/src/scan-gram-c.c:3:0:
src/scan-gram.c: In function 'gram_lex':
../bison-3.0.2/src/scan-gram.l:49:4: error: 'code_start' undeclared (first use
in this function)
code_start = scanner_cursor = loc->start; \
src/scan-gram.c:1402:3: note: in expansion of macro 'YY_USER_INIT'
YY_USER_INIT;
^
../bison-3.0.2/src/scan-gram.l:49:4: note: each undeclared identifier is
reported only once for each function it appears in
code_start = scanner_cursor = loc->start; \
^
src/scan-gram.c:1402:3: note: in expansion of macro 'YY_USER_INIT'
YY_USER_INIT;
^
make[2]: *** [src/bison-scan-gram-c.o] Error 1
make[2]: Leaving directory `/home/ed/gnu/xx'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ed/gnu/xx'
make: *** [all] Fehler 2
To work around this and keep compatible to previous flex versions I would
suggest the attached patch.
Regards,
Bernd Edligner
bison.diff
Description: Binary data
- [PATCH] Fix compile error with flex version 2.5.38 and above,
Bernd Edlinger <=