This is the mail archive of the gcc-patches@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]

[patch] Re: [Bug bootstrap/14795] New: gengtype-yacc.y:275.2-278.9:type clash (`o' `s') on default action


"wanderer at rsu dot ru" <gcc-bugzilla@gcc.gnu.org> writes:
> I can't bootsrap current CVS mainline GCC with
> bison (GNU Bison) 1.75 and flex version 2.5.4

I do not have Bison 1.75 to hand, but this looks like a known problem
with some versions of Bison being pickier about rule syntax than
others.  (The flex errors are because bison failed and therefore
gengtype-yacc.h is missing.)  My fault - I have one of the less picky
versions on the machine I tested my last patch on.  The attached patch
should fix the problem; please test.

Part of the problem here is that we are, for no apparent reason,
ignoring errors from bison and flex.  This was introduced in revision
1.2222 of Makefile.in, which was one of Kelley Cook's patches to stop
writing files into the source directory.  Kelley, why did you do that?
Barring an explanation I propose to remove the ignore-errors markers
(included in the patch below).

zw

        * gengtype-yacc.y (option, stringseq): Add missing 
        terminating semicolon.
        * Makefile.in, java/Make-lang.in, objc/Make-lang.in
        * treelang/Make-lang.in: Don't ignore errors from flex
        or bison.

===================================================================
Index: gengtype-yacc.y
--- gengtype-yacc.y	30 Mar 2004 19:18:54 -0000	1.10
+++ gengtype-yacc.y	31 Mar 2004 10:31:08 -0000
@@ -274,6 +274,7 @@ option:   ID
             { $$ = create_option ($1, (void *)$3); }
 	| type_option '(' type ')'
 	    { $$ = create_option ($1, adjust_field_type ($3, NULL)); }
+	;
 
 optionseq: option
 	      {
@@ -302,4 +303,5 @@ stringseq: STRING
 	       free ((void *)$2);
 	       $$ = s;
 	     }
+	   ;
 %%
===================================================================
Index: Makefile.in
--- Makefile.in	24 Mar 2004 18:03:15 -0000	1.1266
+++ Makefile.in	31 Mar 2004 10:31:08 -0000
@@ -1289,7 +1289,7 @@ gcc.srcextra: c-parse.y c-parse.c gengty
 	-cp -p $^ $(srcdir)
 
 c-parse.c: c-parse.y
-	-$(BISON) $(BISONFLAGS) -o $@ $<
+	$(BISON) $(BISONFLAGS) -o $@ $<
 
 c-parse.y: c-parse.in
 	echo '/*WARNING: This file is automatically generated!*/' >tmp-c-parse.y
@@ -2276,10 +2276,10 @@ gengtype-yacc.o : gengtype-yacc.c gengty
 	 $< $(OUTPUT_OPTION)
 
 gengtype-lex.c : gengtype-lex.l
-	-$(FLEX) $(FLEXFLAGS) -o$@ $<
+	$(FLEX) $(FLEXFLAGS) -o$@ $<
 
 gengtype-yacc.c gengtype-yacc.h: gengtype-yacc.y
-	-$(BISON) $(BISONFLAGS) -d -o gengtype-yacc.c $<
+	$(BISON) $(BISONFLAGS) -d -o gengtype-yacc.c $<
 
 genconditions$(build_exeext) : genconditions.o $(BUILD_EARLY_SUPPORT) \
   $(BUILD_RTL) $(BUILD_ERRORS) $(BUILD_LIBDEPS)
===================================================================
Index: java/Make-lang.in
--- java/Make-lang.in	17 Feb 2004 05:20:25 -0000	1.136
+++ java/Make-lang.in	31 Mar 2004 10:31:10 -0000
@@ -80,10 +80,10 @@ java.srcextra: java/parse.c java/parse-s
 	-cp -p $^ $(srcdir)/java
 
 java/parse.c: java/parse.y
-	-$(BISON) -t --name-prefix=java_ $(BISONFLAGS) -o $@ $<
+	$(BISON) -t --name-prefix=java_ $(BISONFLAGS) -o $@ $<
 
 java/parse-scan.c: java/parse-scan.y
-	-$(BISON) -t $(BISONFLAGS) -o $@ $< 
+	$(BISON) -t $(BISONFLAGS) -o $@ $< 
 
 $(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf
 	(cd $(srcdir)/java || exit 1; \
===================================================================
Index: objc/Make-lang.in
--- objc/Make-lang.in	20 Feb 2004 04:19:33 -0000	1.72
+++ objc/Make-lang.in	31 Mar 2004 10:31:10 -0000
@@ -77,7 +77,7 @@ objc.srcextra: objc/objc-parse.c objc/ob
 	-cp -p $^ $(srcdir)/objc
  
 objc/objc-parse.c : objc/objc-parse.y
-	-$(BISON) $(BISONFLAGS) -o $@ $<
+	$(BISON) $(BISONFLAGS) -o $@ $<
 
 objc/objc-parse.y: c-parse.in
 	echo '/*WARNING: This file is automatically generated!*/' >tmp-objc-prs.y
===================================================================
Index: treelang/Make-lang.in
--- treelang/Make-lang.in	20 Feb 2004 08:08:57 -0000	1.46
+++ treelang/Make-lang.in	31 Mar 2004 10:31:12 -0000
@@ -122,10 +122,10 @@ treelang.srcextra: treelang/parse.c tree
 	-cp -p $^ $(srcdir)/treelang
 
 treelang/lex.c: treelang/lex.l
-	-$(FLEX) $(FLEXFLAGS) -o$@ $<
+	$(FLEX) $(FLEXFLAGS) -o$@ $<
 
 treelang/parse.c treelang/parse.h treelang/parse.output: treelang/parse.y
-	-$(BISON) $(BISONFLAGS) -v --defines --output=treelang/parse.c $<
+	$(BISON) $(BISONFLAGS) -v --defines --output=treelang/parse.c $<
 
 # -v
 

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