summaryrefslogtreecommitdiffstats
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1997-01-07 21:58:22 +0000
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1997-01-07 21:58:22 +0000
commit0bb308c71ffe673532461de2c6fa2b9ce45f2d57 (patch)
tree81cf095863938da19e400e8a3debd820d909461d /gcc/c-parse.in
parenteffb482ad92364b905969439f5c6528eaf0f0b00 (diff)
downloadppe42-gcc-0bb308c71ffe673532461de2c6fa2b9ce45f2d57.tar.gz
ppe42-gcc-0bb308c71ffe673532461de2c6fa2b9ce45f2d57.zip
x
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13478 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r--gcc/c-parse.in22
1 files changed, 16 insertions, 6 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 36d24e74e58..2a40c5a3ce0 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 = $<itype>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
- { $<itype>1 = pedantic;
- pedantic = 0; }
- cast_expr %prec UNARY
- { $$ = $3;
+ | extension cast_expr %prec UNARY
+ { $$ = $2;
pedantic = $<itype>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 = $<itype>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 = $<itype>1; }
;
components:
@@ -2357,6 +2361,12 @@ identifiers_or_typenames:
| identifiers_or_typenames ',' identifier
{ $$ = chainon ($1, build_tree_list (NULL_TREE, $3)); }
;
+
+extension:
+ EXTENSION
+ { $<itype>$ = pedantic;
+ pedantic = 0; }
+ ;
ifobjc
/* Objective-C productions. */
OpenPOWER on IntegriCloud