aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-05-23 07:22:29 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-05-23 07:22:29 -0400
commitd27543a72069e61e61fe22513dce7ee2e65ac839 (patch)
tree51dc73e0b4566c272b627367892f58c2ae3e559a /gcc
parent66910f686fe399ff055fbcf9e70b5643ff7e6d47 (diff)
downloadgcc-d27543a72069e61e61fe22513dce7ee2e65ac839.zip
gcc-d27543a72069e61e61fe22513dce7ee2e65ac839.tar.gz
gcc-d27543a72069e61e61fe22513dce7ee2e65ac839.tar.bz2
Objc shift/reduce conflicts now 48.
(parm): Use setspecs/restore here. (parmlist_or_identifiers): Not here. From-SVN: r9776
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-parse.in66
1 files changed, 43 insertions, 23 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 70063f6..bb4e33b 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -27,7 +27,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
written by AT&T, but I have never seen it. */
ifobjc
-%expect 46
+%expect 48
end ifobjc
ifc
%expect 34
@@ -2150,45 +2150,65 @@ parms:
/* A single parameter declaration or parameter type name,
as found in a parmlist. */
parm:
- typed_declspecs parm_declarator maybe_attribute
- { $$ = build_tree_list (build_tree_list ($1, $2),
+ typed_declspecs setspecs parm_declarator maybe_attribute
+ { $$ = build_tree_list (build_tree_list (current_declspecs,
+ $3),
build_tree_list (prefix_attributes,
- $3)); }
- | typed_declspecs notype_declarator maybe_attribute
- { $$ = build_tree_list (build_tree_list ($1, $2),
+ $4));
+ current_declspecs = TREE_VALUE (declspec_stack);
+ prefix_attributes = TREE_PURPOSE (declspec_stack);
+ declspec_stack = TREE_CHAIN (declspec_stack);
+ resume_momentary ($2); }
+ | typed_declspecs setspecs notype_declarator maybe_attribute
+ { $$ = build_tree_list (build_tree_list (current_declspecs,
+ $3),
build_tree_list (prefix_attributes,
- $3)); }
- | typed_declspecs absdcl maybe_attribute
- { $$ = build_tree_list (build_tree_list ($1, $2),
+ $4));
+ current_declspecs = TREE_VALUE (declspec_stack);
+ prefix_attributes = TREE_PURPOSE (declspec_stack);
+ declspec_stack = TREE_CHAIN (declspec_stack);
+ resume_momentary ($2); }
+ | typed_declspecs setspecs absdcl maybe_attribute
+ { $$ = build_tree_list (build_tree_list (current_declspecs,
+ $3),
build_tree_list (prefix_attributes,
- $3)); }
- | declmods notype_declarator maybe_attribute
- { $$ = build_tree_list (build_tree_list ($1, $2),
+ $4));
+ current_declspecs = TREE_VALUE (declspec_stack);
+ prefix_attributes = TREE_PURPOSE (declspec_stack);
+ declspec_stack = TREE_CHAIN (declspec_stack);
+ resume_momentary ($2); }
+ | declmods setspecs notype_declarator maybe_attribute
+ { $$ = build_tree_list (build_tree_list (current_declspecs,
+ $3),
build_tree_list (prefix_attributes,
- $3)); }
+ $4));
+ current_declspecs = TREE_VALUE (declspec_stack);
+ prefix_attributes = TREE_PURPOSE (declspec_stack);
+ declspec_stack = TREE_CHAIN (declspec_stack);
+ resume_momentary ($2); }
- | declmods absdcl maybe_attribute
- { $$ = build_tree_list (build_tree_list ($1, $2),
+ | declmods setspecs absdcl maybe_attribute
+ { $$ = build_tree_list (build_tree_list (current_declspecs,
+ $3),
build_tree_list (prefix_attributes,
- $3)); }
+ $4));
+ current_declspecs = TREE_VALUE (declspec_stack);
+ prefix_attributes = TREE_PURPOSE (declspec_stack);
+ declspec_stack = TREE_CHAIN (declspec_stack);
+ resume_momentary ($2); }
;
/* This is used in a function definition
where either a parmlist or an identifier list is ok.
Its value is a list of ..._TYPE nodes or a list of identifiers. */
parmlist_or_identifiers:
- setspecs
{ pushlevel (0);
clear_parm_order ();
declare_parm_level (1); }
parmlist_or_identifiers_1
- { $$ = $3;
+ { $$ = $2;
parmlist_tags_warning ();
- poplevel (0, 0, 0);
- current_declspecs = TREE_VALUE (declspec_stack);
- prefix_attributes = TREE_PURPOSE (declspec_stack);
- declspec_stack = TREE_CHAIN (declspec_stack);
- resume_momentary ($1); }
+ poplevel (0, 0, 0); }
;
parmlist_or_identifiers_1: