diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-04-26 21:24:51 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-04-26 21:24:51 +0000 |
commit | 02ca53049073d0de745cc44bc1a520b7efefd333 (patch) | |
tree | deb4a76a39fc28b17040b511f15d04a59fac8a94 /gcc/c-parse.in | |
parent | 92b4910baadb6f608570fd324fdf7b359d01a2ca (diff) | |
download | gcc-02ca53049073d0de745cc44bc1a520b7efefd333.tar.gz |
Update number of shift/reduce conflicts.
(structsp): Pass attribute arg to finish_struct.
Support attributes on enums and pass to finish_enum.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9487 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index b843181170c..f6bdbe330a7 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -24,13 +24,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ c-parse.y and into objc-parse.y. */ /* To whomever it may concern: I have heard that such a thing was once -written by AT&T, but I have never seen it. */ + written by AT&T, but I have never seen it. */ ifobjc -%expect 40 +%expect 42 end ifobjc ifc -%expect 28 +%expect 30 /* These are the 23 conflicts you should get in parse.output; the state numbers may vary if minor changes in the grammar are made. @@ -1310,41 +1310,34 @@ structsp: /* Start scope of tag before parsing components. */ } component_decl_list '}' maybe_attribute - { $$ = finish_struct ($<ttype>4, $5); - decl_attributes ($$, $7, NULL_TREE); - /* Really define the structure. */ - } + { $$ = finish_struct ($<ttype>4, $5, $7); } | STRUCT '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), - $3); - decl_attributes ($$, $5, NULL_TREE); + $3, $5); } | STRUCT identifier { $$ = xref_tag (RECORD_TYPE, $2); } | UNION identifier '{' { $$ = start_struct (UNION_TYPE, $2); } component_decl_list '}' maybe_attribute - { $$ = finish_struct ($<ttype>4, $5); - decl_attributes ($$, $7, NULL_TREE); - } + { $$ = finish_struct ($<ttype>4, $5, $7); } | UNION '{' component_decl_list '}' maybe_attribute { $$ = finish_struct (start_struct (UNION_TYPE, NULL_TREE), - $3); - decl_attributes ($$, $5, NULL_TREE); + $3, $5); } | UNION identifier { $$ = xref_tag (UNION_TYPE, $2); } | ENUM identifier '{' { $<itype>3 = suspend_momentary (); $$ = start_enum ($2); } - enumlist maybecomma_warn '}' - { $$ = finish_enum ($<ttype>4, nreverse ($5)); + enumlist maybecomma_warn '}' maybe_attribute + { $$ = finish_enum ($<ttype>4, nreverse ($5), $8); resume_momentary ($<itype>3); } | ENUM '{' { $<itype>2 = suspend_momentary (); $$ = start_enum (NULL_TREE); } - enumlist maybecomma_warn '}' - { $$ = finish_enum ($<ttype>3, nreverse ($4)); + enumlist maybecomma_warn '}' maybe_attribute + { $$ = finish_enum ($<ttype>3, nreverse ($4), $7); resume_momentary ($<itype>2); } | ENUM identifier { $$ = xref_tag (ENUMERAL_TYPE, $2); } |