This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix gcc/gengtype-yacc.y
- From: Akim Demaille <akim at epita dot fr>
- To: GCC Patches <gcc-patches at gnu dot org>
- Date: 07 Jun 2002 18:09:39 +0200
- Subject: Re: Fix gcc/gengtype-yacc.y
- References: <mv4lm9ssnbu.fsf@nostromo.lrde.epita.fr>
>>>>> "Akim" == Akim Demaille <akim@epita.fr> writes:
Akim> The FSF has my assignment.
Akim> This patch fixes a simple error, plus trailing spaces.
The file produces a broken C file with modern Bisons, or any other
Yacc. Please, install it.
Index: ChangeLog
from Akim Demaille <akim@epita.fr>
* gengtype-yacc.y (optionseqopt): Add the ending `;' to the action.
Index: gengtype-yacc.y
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/gengtype-yacc.y,v
retrieving revision 1.3
diff -u -u -r1.3 gengtype-yacc.y
--- gengtype-yacc.y 5 Jun 2002 00:08:00 -0000 1.3
+++ gengtype-yacc.y 6 Jun 2002 10:38:44 -0000
@@ -84,7 +84,7 @@
externstatic: ENT_EXTERNSTATIC options lasttype ID semiequal
{
- note_variable ($4, adjust_field_type ($3, $2), $2,
+ note_variable ($4, adjust_field_type ($3, $2), $2,
&lexer_line);
}
| ENT_EXTERNSTATIC options lasttype ID ARRAY semiequal
@@ -101,7 +101,7 @@
;
lasttype: type
- {
+ {
lexer_toplevel_done = 1;
$$ = $1;
}
@@ -121,7 +121,7 @@
yacc_typematch: /* empty */
{ $$ = NULL; }
| yacc_typematch PERCENT_ID yacc_ids
- {
+ {
pair_p p;
for (p = $3; p->next != NULL; p = p->next)
{
@@ -154,7 +154,7 @@
yacc_ids: /* empty */
{ $$ = NULL; }
| yacc_ids ID
- {
+ {
pair_p p = xcalloc (1, sizeof (*p));
p->next = $1;
p->line = lexer_line;
@@ -272,7 +272,7 @@
$$ = o;
}
| ID '(' STRING ')'
- {
+ {
options_p o = xmalloc (sizeof (*o));
o->name = $1;
o->info = (void *)$3;
@@ -292,7 +292,7 @@
}
;
-optionseqopt: { $$ = NULL }
+optionseqopt: { $$ = NULL; }
| optionseq { $$ = $1; }
;
%%