Commit d3b4cd6f by Aldy Hernandez Committed by Aldy Hernandez

c-parse.in (typename): Do not split attributes.

	* c-parse.in (typename): Do not split attributes.
        Remove unsupported attributes warning.

        * c-decl.c (groktypename): Apply attributes.

From-SVN: r48032
parent cdf89524
2001-12-14 Aldy Hernandez <aldyh@redhat.com>
* c-parse.in (typename): Do not split attributes.
Remove unsupported attributes warning.
* c-decl.c (groktypename): Apply attributes.
2001-12-14 Richard Henderson <rth@redhat.com> 2001-12-14 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.c (spill_restore_mem): Mark iterator * config/ia64/ia64.c (spill_restore_mem): Mark iterator
......
...@@ -3359,11 +3359,19 @@ tree ...@@ -3359,11 +3359,19 @@ tree
groktypename (typename) groktypename (typename)
tree typename; tree typename;
{ {
tree specs, attrs;
if (TREE_CODE (typename) != TREE_LIST) if (TREE_CODE (typename) != TREE_LIST)
return typename; return typename;
return grokdeclarator (TREE_VALUE (typename),
TREE_PURPOSE (typename), split_specs_attrs (TREE_PURPOSE (typename), &specs, &attrs);
TYPENAME, 0);
typename = grokdeclarator (TREE_VALUE (typename), specs, TYPENAME, 0);
/* Apply attributes. */
decl_attributes (&typename, attrs, 0);
return typename;
} }
/* Return a PARM_DECL node for a given pair of specs and declarator. */ /* Return a PARM_DECL node for a given pair of specs and declarator. */
......
...@@ -669,6 +669,7 @@ primary: ...@@ -669,6 +669,7 @@ primary:
{ $$ = build_function_call ($1, $3); } { $$ = build_function_call ($1, $3); }
| VA_ARG '(' expr_no_commas ',' typename ')' | VA_ARG '(' expr_no_commas ',' typename ')'
{ $$ = build_va_arg ($3, groktypename ($5)); } { $$ = build_va_arg ($3, groktypename ($5)); }
| CHOOSE_EXPR '(' expr_no_commas ',' expr_no_commas ',' expr_no_commas ')' | CHOOSE_EXPR '(' expr_no_commas ',' expr_no_commas ',' expr_no_commas ')'
{ {
tree c; tree c;
...@@ -1906,13 +1907,8 @@ enumerator: ...@@ -1906,13 +1907,8 @@ enumerator:
typename: typename:
declspecs_nosc declspecs_nosc
{ tree specs, attrs; { pending_xref_error ();
pending_xref_error (); $<ttype>$ = $1; }
split_specs_attrs ($1, &specs, &attrs);
/* We don't yet support attributes here. */
if (attrs != NULL_TREE)
warning ("attributes on type name ignored");
$<ttype>$ = specs; }
absdcl absdcl
{ $$ = build_tree_list ($<ttype>2, $3); } { $$ = build_tree_list ($<ttype>2, $3); }
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment