[comp.sys.sun] Bug in YACC in 4.1?

coulman@jacob.usask.ca (08/03/90)

We've been having some trouble with YACC under 4.1.  Yacc will
successfully run on our input file, but when we compile the resulting
y.tab.c file, we get error messages which are completely cryptic and that
state a line number much past the end of the file.  This problem does not
manifest itself under 4.0.3.c.  A transcript follows (both lot and jacob
are SLC's - lot is running 4.1 and jacob 4.0.3):

>lot running SunOS Release 4.1 (GENERIC_SMALL) #1:
>
>
>lot% touch occam.y
>lot% make
>yacc -d occam.y
>cc -g  -target sun4 -c  lex.yy.c
>cc -g  -target sun4 -c  scan.c
>cc -g  -target sun4 -c  y.tab.c
>"occam.y", line 1274: syntax error at or near constant 116
>"occam.y", line 1274: zero sized structure
>*** Error code 1
>make: Fatal error: Command failed for target `y.tab.o'
>lot% cat occam.y | wc -l
>     856

>jacob running SunOS Release 4.0.3c (GENERIC) #1:
>
>jacob% touch occam.y
>jacob% make
>yacc -d occam.y
>cc -g  -sun4 -c  lex.yy.c
>cc -g  -sun4 -c  scan.c
>cc -g  -sun4 -c  y.tab.c
>cc -g arch.o ast.o common.o error.o expr.o lex.yy.o occom.o parse.o scan.o  sym
   tab.o stack.o template.o typeops.o y.tab.o -ll -o occom

Note that the constant 116 is a defined constant in one of our include
files.  We have tried the various combinations of YACCing and compiling on
each machine to isolate the problem and the problem is with YACC under
4.1.

Has anyone seen this problem or know of a solution?

Thanks in advance,
Randy

Randy A. Coulman
Department of Computational Science
University of Saskatchewan
coulman@cs.Usask.ca         coulman@skaries.Usask.ca