URL: <http://savannah.gnu.org/support/?108692>
Summary: generated src/scan-gram.c file does not compile Project: bison Submitted by: None Submitted on: Sat 29 Nov 2014 12:07:07 AM UTC Category: None Priority: 5 - Normal Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Operating System: None _______________________________________________________ Details: For bison 3.0.2. tar xpfz bison-3.0.2.tar.gz cd bison-3.0.2 mv src/scan-gram.c src/scan-gram.c.orig ./configure ... make GEN examples/extracted.stamp extexi: GEN examples/rpcalc/rpcalc.y extexi: GEN examples/mfcalc/mfcalc.y extexi: GEN examples/mfcalc/calc.h extexi: GEN examples/calc++/calc++-driver.hh extexi: GEN examples/calc++/calc++-driver.cc extexi: GEN examples/calc++/calc++-parser.yy extexi: GEN examples/calc++/calc++-scanner.ll extexi: GEN examples/calc++/calc++.cc GEN lib/alloca.h GEN lib/configmake.h GEN lib/c++defs.h GEN lib/arg-nonnull.h GEN lib/warn-on-use.h GEN lib/fcntl.h GEN lib/getopt.h GEN lib/inttypes.h GEN lib/math.h GEN lib/signal.h GEN lib/spawn.h GEN lib/stdio.h GEN lib/stdlib.h GEN lib/string.h GEN lib/sys/stat.h GEN lib/sys/types.h GEN lib/sys/wait.h GEN lib/time.h GEN lib/unistd.h GEN lib/unitypes.h GEN lib/uniwidth.h GEN lib/wchar.h GEN lib/wctype.h LEX src/scan-gram.c make all-recursive make[1]: Entering directory `/export/home/kim/tmp/bison-3.0.2' Making all in po make[2]: Entering directory `/export/home/kim/tmp/bison-3.0.2/po' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/export/home/kim/tmp/bison-3.0.2/po' Making all in runtime-po make[2]: Entering directory `/export/home/kim/tmp/bison-3.0.2/runtime-po' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/export/home/kim/tmp/bison-3.0.2/runtime-po' Making all in . make[2]: Entering directory `/export/home/kim/tmp/bison-3.0.2' CC src/bison-AnnotationList.o CC src/bison-InadequacyList.o CC src/bison-LR0.o CC src/bison-Sbitset.o CC src/bison-assoc.o CC src/bison-closure.o CC src/bison-complain.o CC src/bison-conflicts.o CC src/bison-derives.o CC src/bison-files.o CC src/bison-getargs.o CC src/bison-gram.o CC src/bison-graphviz.o CC src/bison-lalr.o CC src/bison-ielr.o CC src/bison-location.o CC src/bison-main.o CC src/bison-muscle-tab.o CC src/bison-named-ref.o CC src/bison-nullable.o CC src/bison-output.o CC src/bison-parse-gram.o CC src/bison-print-xml.o CC src/bison-print.o CC src/bison-print_graph.o CC src/bison-reader.o CC src/bison-reduce.o CC src/bison-relation.o CC src/bison-scan-code-c.o CC src/bison-scan-gram-c.o In file included from src/scan-gram-c.c:3:0: src/scan-gram.c: In function 'gram_lex': 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; ^ 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 `/export/home/kim/tmp/bison-3.0.2' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/export/home/kim/tmp/bison-3.0.2' make: *** [all] Error 2 The generated src/scan-gram.c is NOT the same as the one included in bison-3.0.2.tar.gz. The code in the definition of the YY_DECL function has the user's preamble code placed after the first use of the code_start variable. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/support/?108692> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison