diff options
| author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-06-14 12:06:01 +0000 |
|---|---|---|
| committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-06-14 12:06:01 +0000 |
| commit | 261dd1b5c074e8a9b4ac1a66e05160238dd97b8e (patch) | |
| tree | a892cffe96b97f704fd78a03594ad4f1a72643d9 /gcc | |
| parent | 12535736e3e3676f9a301e8345a1d50f933e2f23 (diff) | |
| download | ppe42-gcc-261dd1b5c074e8a9b4ac1a66e05160238dd97b8e.tar.gz ppe42-gcc-261dd1b5c074e8a9b4ac1a66e05160238dd97b8e.zip | |
(fndef, nested_function, notype_nested_function): Support attributes
after function definition.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/c-parse.in | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index bb4e33b0426..ad6a343d825 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -27,10 +27,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ written by AT&T, but I have never seen it. */ ifobjc -%expect 48 +%expect 53 end ifobjc ifc -%expect 34 +%expect 39 /* These are the 23 conflicts you should get in parse.output; the state numbers may vary if minor changes in the grammar are made. @@ -338,8 +338,8 @@ datadef: ; fndef: - typed_declspecs setspecs declarator - { if (! start_function ($1, $3, prefix_attributes, 0)) + typed_declspecs setspecs declarator maybe_attribute + { if (! start_function ($1, $3, prefix_attributes, $4, 0)) YYERROR1; reinit_parse_for_function (); } xdecls @@ -355,8 +355,8 @@ fndef: prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } - | declmods setspecs notype_declarator - { if (! start_function ($1, $3, prefix_attributes, 0)) + | declmods setspecs notype_declarator maybe_attribute + { if (! start_function ($1, $3, prefix_attributes, $4, 0)) YYERROR1; reinit_parse_for_function (); } xdecls @@ -372,8 +372,9 @@ fndef: prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary ($2); } - | setspecs notype_declarator - { if (! start_function (NULL_TREE, $2, prefix_attributes, 0)) + | setspecs notype_declarator maybe_attribute + { if (! start_function (NULL_TREE, $2, + prefix_attributes, $3, 0)) YYERROR1; reinit_parse_for_function (); } xdecls @@ -1217,10 +1218,10 @@ end ifc ; nested_function: - declarator + declarator maybe_attribute { push_c_function_context (); if (! start_function (current_declspecs, $1, - prefix_attributes, 1)) + prefix_attributes, $2, 1)) { pop_c_function_context (); YYERROR1; @@ -1240,10 +1241,10 @@ nested_function: ; notype_nested_function: - notype_declarator + notype_declarator maybe_attribute { push_c_function_context (); if (! start_function (current_declspecs, $1, - prefix_attributes, 1)) + prefix_attributes, $2, 1)) { pop_c_function_context (); YYERROR1; |

