From: "Theodore A. Roth" <troth@openavr.org>
To: gdb-patches@sources.redhat.com
Subject: [RFC] broken build using bison-1.75
Date: Tue, 05 Nov 2002 09:54:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0211050946290.5490-200000@knuth.amplepower.com> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 529 bytes --]
Hi,
Looks like debian testing is using bison-1.75 now (was using 1.35
previously) which has some minor problems parsing some of the yacc files.
The attached patch got gdb to compile for me using bison 1.75 and 1.35 on
a debian system. The missing semicolons seem obvious fixes to me, but the
new setup rule I added I'm not sure about since I can't test this myself
and don't have a good understanding of yacc grammar.
For what it's worth, here's my configure options:
--target=avr --enable-build-warnings=-Werror
Ted Roth
[-- Attachment #2: Type: TEXT/PLAIN, Size: 3619 bytes --]
2002-11-05 Theodore A. Roth <troth@openavr.org>
* gdb/c-exp.y: Add missing semi-colons.
* gdb/f-exp.y: Add missing semi-colons.
* gdb/m2-exp.y: Add missing semi-colons.
* gdb/p-exp.y: Add missing semi-colons.
Add setup rule to avoid a type clash.
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 5 Nov 2002 17:40:43 -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 5 Nov 2002 17:40:43 -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 5 Nov 2002 17:40:46 -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 5 Nov 2002 17:40:46 -0000
@@ -162,7 +162,7 @@
static int search_field;
%}
-%type <voidval> exp exp1 type_exp start normal_start variable qualified_name
+%type <voidval> exp exp1 type_exp start setup normal_start variable qualified_name
%type <tval> type typebase
/* %type <bval> block */
@@ -230,10 +230,13 @@
\f
%%
-start : { current_type = NULL;
+start : setup normal_start
+ ;
+
+setup : { current_type = NULL;
search_field = 0;
}
- normal_start;
+ ;
normal_start :
exp1
@@ -257,11 +260,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 +322,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
next reply other threads:[~2002-11-05 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-05 9:54 Theodore A. Roth [this message]
2002-11-06 12:23 ` Michael Snyder
2002-11-06 12:54 ` Theodore A. Roth
2002-11-06 13:25 ` Michael Snyder
2002-11-07 9:47 ` Jim Blandy
2002-11-07 12:05 ` Jim Blandy
2002-11-07 12:14 ` Jim Blandy
2002-11-06 13:38 Johannes Stezenbach
2002-11-06 13:57 ` Theodore A. Roth
2002-11-06 14:05 ` Johannes Stezenbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0211050946290.5490-200000@knuth.amplepower.com \
--to=troth@openavr.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox