From 72acf258c6df6782d4f49b7f638a116ce70ad0ff Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 7 Jan 1997 21:58:22 +0000 Subject: [PATCH] x From-SVN: r13478 --- gcc/c-parse.in | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 36d24e7..2a40c5a 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -31,7 +31,7 @@ ifobjc %expect 66 end ifobjc ifc -%expect 45 +%expect 46 /* These are the 23 conflicts you should get in parse.output; the state numbers may vary if minor changes in the grammar are made. @@ -309,6 +309,8 @@ end ifobjc assemble_asm ($3); else error ("argument of `asm' is not a constant string"); } + | extension extdef + { pedantic = $1; } ; datadef: @@ -447,11 +449,8 @@ unary_expr: | '*' cast_expr %prec UNARY { $$ = build_indirect_ref ($2, "unary *"); } /* __extension__ turns off -pedantic for following primary. */ - | EXTENSION - { $1 = pedantic; - pedantic = 0; } - cast_expr %prec UNARY - { $$ = $3; + | extension cast_expr %prec UNARY + { $$ = $2; pedantic = $1; } | unop cast_expr %prec UNARY { $$ = build_unary_op ($1, $2, 0); @@ -1012,6 +1011,8 @@ decl: { shadow_tag ($1); } | declmods ';' { pedwarn ("empty declaration"); } + | extension decl + { pedantic = $1; } ; /* Declspecs which contain at least one type specifier or typedef name. @@ -1564,6 +1565,9 @@ component_decl: $$ = NULL_TREE; } | error { $$ = NULL_TREE; } + | extension component_decl + { $$ = $2; + pedantic = $1; } ; components: @@ -2357,6 +2361,12 @@ identifiers_or_typenames: | identifiers_or_typenames ',' identifier { $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); } ; + +extension: + EXTENSION + { $$ = pedantic; + pedantic = 0; } + ; ifobjc /* Objective-C productions. */ -- 2.7.4