Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [RFC] broken build using bison-1.75
@ 2002-11-06 13:38 Johannes Stezenbach
  2002-11-06 13:57 ` Theodore A. Roth
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Stezenbach @ 2002-11-06 13:38 UTC (permalink / raw)
  To: Michael Snyder, Theodore A. Roth; +Cc: gdb-patches

Hi,

I just fumbled with this two days ago, but did not post to the
list immediately because I'm not subscribed. The fix is similar
to what the binutils people were doing.

/bin/sh ../../gdb+dejagnu-5.3-branch-20021031/gdb/../ylwrap "bison -y" ../../gdb+dejagnu-5.3-branch-20021031/gdb/c-exp.y  y.tab.c c-exp.tmp --  
/home/js/MIPS/toolchain/mips-linux-gdb/gdb/../../gdb+dejagnu-5.3-branch-20021031/gdb/c-exp.y:248.5-251.3: type clash (`voidval' `') on default action
/home/js/MIPS/toolchain/mips-linux-gdb/gdb/../../gdb+dejagnu-5.3-branch-20021031/gdb/c-exp.y:251.5: parse error, unexpected ":", expecting ";" or "|"
make[1]: *** [c-exp.tab.c] Error 1

--- gdb+dejagnu-5.3-branch-20021031/gdb/p-exp.y.orig    2002-11-04 21:15:06.000000000 +0100
+++ gdb+dejagnu-5.3-branch-20021031/gdb/p-exp.y 2002-11-04 21:18:35.000000000 +0100
@@ -233,7 +233,8 @@
 start   :      { current_type = NULL;
                  search_field = 0;
                }
-               normal_start;
+               normal_start {}
+       ;
 
 normal_start   :
                exp1


Regards,
Johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC] broken build using bison-1.75
  2002-11-06 13:38 [RFC] broken build using bison-1.75 Johannes Stezenbach
@ 2002-11-06 13:57 ` Theodore A. Roth
  2002-11-06 14:05   ` Johannes Stezenbach
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore A. Roth @ 2002-11-06 13:57 UTC (permalink / raw)
  To: Johannes Stezenbach; +Cc: Michael Snyder, Theodore A. Roth, gdb-patches



On Wed, 6 Nov 2002, Johannes Stezenbach wrote:

:) Hi,
:)
:) I just fumbled with this two days ago, but did not post to the
:) list immediately because I'm not subscribed. The fix is similar
:) to what the binutils people were doing.
:)
:) /bin/sh ../../gdb+dejagnu-5.3-branch-20021031/gdb/../ylwrap "bison -y" ../../gdb+dejagnu-5.3-branch-20021031/gdb/c-exp.y  y.tab.c c-exp.tmp --
:) /home/js/MIPS/toolchain/mips-linux-gdb/gdb/../../gdb+dejagnu-5.3-branch-20021031/gdb/c-exp.y:248.5-251.3: type clash (`voidval' `') on default action
:) /home/js/MIPS/toolchain/mips-linux-gdb/gdb/../../gdb+dejagnu-5.3-branch-20021031/gdb/c-exp.y:251.5: parse error, unexpected ":", expecting ";" or "|"
:) make[1]: *** [c-exp.tab.c] Error 1

Yup, that's exactly what I'm seeing.

:)
:) --- gdb+dejagnu-5.3-branch-20021031/gdb/p-exp.y.orig    2002-11-04 21:15:06.000000000 +0100
:) +++ gdb+dejagnu-5.3-branch-20021031/gdb/p-exp.y 2002-11-04 21:18:35.000000000 +0100
:) @@ -233,7 +233,8 @@
:)  start   :      { current_type = NULL;
:)                   search_field = 0;
:)                 }
:) -               normal_start;
:) +               normal_start {}
:) +       ;
:)
:)  normal_start   :
:)                 exp1
:)

That looks much nicer and simpler than my fix. Do you have a reference to
what the binutils people are doing so I can try to grok the fix?

Ted Roth


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC] broken build using bison-1.75
  2002-11-06 13:57 ` Theodore A. Roth
@ 2002-11-06 14:05   ` Johannes Stezenbach
  2002-11-06 14:31     ` [RFA] (second rev) " Theodore A. Roth
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Stezenbach @ 2002-11-06 14:05 UTC (permalink / raw)
  To: Theodore A. Roth; +Cc: Michael Snyder, gdb-patches

Theodore A. Roth wrote:
> 
> That looks much nicer and simpler than my fix. Do you have a reference to
> what the binutils people are doing so I can try to grok the fix?

Yes:
http://sources.redhat.com/ml/binutils/2002-10/msg00230.html

Johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFA] (second rev) broken build using bison-1.75
  2002-11-06 14:05   ` Johannes Stezenbach
@ 2002-11-06 14:31     ` Theodore A. Roth
  2002-11-06 14:41       ` Michael Snyder
  0 siblings, 1 reply; 6+ messages in thread
From: Theodore A. Roth @ 2002-11-06 14:31 UTC (permalink / raw)
  To: Johannes Stezenbach; +Cc: Michael Snyder, gdb-patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 611 bytes --]



On Wed, 6 Nov 2002, Johannes Stezenbach wrote:

:) Theodore A. Roth wrote:
:) >
:) > That looks much nicer and simpler than my fix. Do you have a reference to
:) > what the binutils people are doing so I can try to grok the fix?
:)
:) Yes:
:) http://sources.redhat.com/ml/binutils/2002-10/msg00230.html

Thanks. It's probably safe to assume Alan knows what he's doing.
(I hope ;-) I'm still not enlightened as to why it's the correct fix
though. Haven't paid my dues to the yacc gods yet.

Attached is a revised patch with Johannes suggested fix for the type clash
error.

Is this ok to commit now?

Ted Roth

[-- Attachment #2: Type: TEXT/PLAIN, Size: 3315 bytes --]

2002-11-06  Theodore A. Roth  <troth@openavr.org>

	* c-exp.y: Add missing semi-colons.
	* f-exp.y: Add missing semi-colons.
	* m2-exp.y: Add missing semi-colons.
	* p-exp.y: Add missing semi-colons.
	Add empty action to start rule to avoid a type clash error when
	building with bison >= 1.50.

Index: gdb/c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.16
diff -u -r1.16 c-exp.y
--- gdb/c-exp.y	11 Oct 2002 14:02:37 -0000	1.16
+++ gdb/c-exp.y	6 Nov 2002 22:11:34 -0000
@@ -247,9 +247,11 @@
 /* Expressions, not including the comma operator.  */
 exp	:	'*' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_IND); }
+	;
 
 exp	:	'&' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_ADDR); }
+	;
 
 exp	:	'-' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_NEG); }
Index: gdb/f-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/f-exp.y,v
retrieving revision 1.8
diff -u -r1.8 f-exp.y
--- gdb/f-exp.y	3 Sep 2002 02:45:56 -0000	1.8
+++ gdb/f-exp.y	6 Nov 2002 22:11:34 -0000
@@ -241,9 +241,11 @@
 /* Expressions, not including the comma operator.  */
 exp	:	'*' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_IND); }
+	;
 
 exp	:	'&' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_ADDR); }
+	;
 
 exp	:	'-' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_NEG); }
@@ -283,6 +285,7 @@
 
 arglist :      substring
                         { arglist_len = 2;}
+	;
    
 arglist	:	arglist ',' exp   %prec ABOVE_COMMA
 			{ arglist_len++; }
Index: gdb/m2-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/m2-exp.y,v
retrieving revision 1.6
diff -u -r1.6 m2-exp.y
--- gdb/m2-exp.y	3 Sep 2002 02:45:56 -0000	1.6
+++ gdb/m2-exp.y	6 Nov 2002 22:11:35 -0000
@@ -216,6 +216,7 @@
 
 exp     :       exp '^'   %prec UNARY
                         { write_exp_elt_opcode (UNOP_IND); }
+	;
 
 exp	:	'-'
 			{ number_sign = -1; }
@@ -330,6 +331,7 @@
 
 exp	:	EXCL '(' exp ',' exp ')'
 			{ error("Sets are not implemented.");}
+	;
 
 set	:	'{' arglist '}'
 			{ error("Sets are not implemented.");}
Index: gdb/p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.16
diff -u -r1.16 p-exp.y
--- gdb/p-exp.y	11 Oct 2002 14:02:38 -0000	1.16
+++ gdb/p-exp.y	6 Nov 2002 22:11:35 -0000
@@ -233,7 +233,8 @@
 start   :	{ current_type = NULL;
 		  search_field = 0;
 		}
-		normal_start;
+		normal_start {}
+	;
 
 normal_start	:
 		exp1
@@ -257,11 +258,13 @@
 			{ write_exp_elt_opcode (UNOP_IND);
 			  if (current_type) 
 			    current_type = TYPE_TARGET_TYPE (current_type); }
+	;
 
 exp	:	'@' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_ADDR); 
 			  if (current_type)
 			    current_type = TYPE_POINTER_TYPE (current_type); }
+	;
 
 exp	:	'-' exp    %prec UNARY
 			{ write_exp_elt_opcode (UNOP_NEG); }
@@ -317,6 +320,7 @@
 			  write_exp_elt_opcode (BINOP_SUBSCRIPT);
 			  if (current_type)
 			    current_type = TYPE_TARGET_TYPE (current_type); }
+	;
 
 exp	:	exp '('
 			/* This is to save the value of arglist_len

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA] (second rev) broken build using bison-1.75
  2002-11-06 14:31     ` [RFA] (second rev) " Theodore A. Roth
@ 2002-11-06 14:41       ` Michael Snyder
  2002-11-06 14:57         ` Theodore A. Roth
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Snyder @ 2002-11-06 14:41 UTC (permalink / raw)
  To: Theodore A. Roth; +Cc: Johannes Stezenbach, gdb-patches

"Theodore A. Roth" wrote:
> 
> On Wed, 6 Nov 2002, Johannes Stezenbach wrote:
> 
> :) Theodore A. Roth wrote:
> :) >
> :) > That looks much nicer and simpler than my fix. Do you have a reference to
> :) > what the binutils people are doing so I can try to grok the fix?
> :)
> :) Yes:
> :) http://sources.redhat.com/ml/binutils/2002-10/msg00230.html
> 
> Thanks. It's probably safe to assume Alan knows what he's doing.
> (I hope ;-) I'm still not enlightened as to why it's the correct fix
> though. Haven't paid my dues to the yacc gods yet.
> 
> Attached is a revised patch with Johannes suggested fix for the type clash
> error.
> 
> Is this ok to commit now?

Yeah, I like this better.  Please check it in.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA] (second rev) broken build using bison-1.75
  2002-11-06 14:41       ` Michael Snyder
@ 2002-11-06 14:57         ` Theodore A. Roth
  0 siblings, 0 replies; 6+ messages in thread
From: Theodore A. Roth @ 2002-11-06 14:57 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches



On Wed, 6 Nov 2002, Michael Snyder wrote:

:) > Is this ok to commit now?
:)
:) Yeah, I like this better.  Please check it in.
:)

Ok. Committed to both mainline and 5.3 branch (per Andrew's
recommendation).

Ted Roth


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-06 22:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06 13:38 [RFC] broken build using bison-1.75 Johannes Stezenbach
2002-11-06 13:57 ` Theodore A. Roth
2002-11-06 14:05   ` Johannes Stezenbach
2002-11-06 14:31     ` [RFA] (second rev) " Theodore A. Roth
2002-11-06 14:41       ` Michael Snyder
2002-11-06 14:57         ` Theodore A. Roth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox