This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using GCC 2.95 as a bootstrap compiler


> Aparently current mainline triggers a bug in GCC 2.95 or we might be
> encountering undefined behavior in our PCH-related code?
> 
> In any case, some ten days ago (rough estimate) mainline stopped building
> both with stock GCC 2.95.3 and the FreeBSD system compiler (GCC 2.95.4) on
> i386-unknown-freebsd4.8:
> 
> /sw/gcc-2.95.3/bin/gcc   -g  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H -DGENERATOR_FILE  -o gengtype \
>  gengtype.o gengtype-lex.o gengtype-yacc.o ../libiberty/libiberty.a
> ./gengtype
> /sw/test/gcc/cvs/gcc/input.h:27: parse error, unexpected ENT_YACCUNION, expecting GTY_TOKEN
> gmake[2]: *** [s-gtype] Error 1
> gmake[2]: Leaving directory `/files/pfeifer/OBJ-1031-1155/gcc'
> gmake[1]: *** [stage1_build] Error 2
> 
> Gerald

I came across this the other night.  It's a version skew of 
gengtype-yacc.h between an obsolete copy in the source tree and a 
generated copy in the build tree.  gcc-2.95 was including the files in a 
different order based on #line directives[1].

Remove the copies of gengtype-*.[ch] from your source tree and the problem 
all goes away.

R.

[1] I'm not a cpp expert, but I'm surprised that this changed with the new 
pre-processor.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]