This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] - Detect Bison version skew
- To: "gcc-patches (E-mail)" <gcc-patches at gcc dot gnu dot org>
- Subject: [PATCH] - Detect Bison version skew
- From: Donn Terry <donnte at microsoft dot com>
- Date: Wed, 28 Jun 2000 11:01:28 -0700
Problem:
SIGSEGV while compiling libobjc/linking.m .
Ultimately this is caused by version skew between the C and Objective
C grammars if they are processed by different versions of Bison.
(This can occur at least, but not only, if the official CVS sources
didn't get updated completely.) The patch below does not fix the
problem (that appears to be rather messy) but it does detect the
problem so it can be quickly fixed. (It is a long hard pull to
determine that it's Bison verison skew if it should happen to
happen.)
Feb 17 2000 Donn Terry (donnte@microsoft.com)
* (objc/Make-lang.in): when making objc-parse.o make sure
that c-parse.c was made with the same Bison.
--- //S/CVS/egcs-20000103/gcc/objc/Make-lang.in Thu Feb 10 13:27:28 2000
+++ gcc/objc/Make-lang.in Fri Feb 11 10:28:57 2000
@@ -69,6 +69,13 @@ objc-parse.o : $(srcdir)/objc/objc-parse
$(srcdir)/c-lex.h $(srcdir)/c-tree.h $(srcdir)/c-common.h \
$(srcdir)/input.h $(srcdir)/flags.h $(srcdir)/output.h \
$(srcdir)/objc/objc-act.h system.h
+ if grep "`grep "Bison version" $(srcdir)/c-parse.c|sed -e 's,*/,,'`"
$(srcdir)/objc/objc-parse.c; then \
+ : nothing; \
+ else \
+ echo Bison version skew betwenn c-parse.c and objc-parse.c; \
+ echo touch c-parse.in and restart the build; \
+ exit 1; \
+ fi
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
-c $(srcdir)/objc/objc-parse.c