aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2001-12-15 04:06:05 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2001-12-15 04:06:05 +0000
commitd3b4cd6f89460f3393850c84be374987d17c210c (patch)
tree174090deb0749cfb0ad32ae8786fe0323b1e04d1 /gcc
parentcdf89524e36110b12dc0ed47edec9d6359c284b7 (diff)
downloadgcc-d3b4cd6f89460f3393850c84be374987d17c210c.zip
gcc-d3b4cd6f89460f3393850c84be374987d17c210c.tar.gz
gcc-d3b4cd6f89460f3393850c84be374987d17c210c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/c-decl.c14
-rw-r--r--gcc/c-parse.in10
3 files changed, 21 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 642395b..56e17a4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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>
* config/ia64/ia64.c (spill_restore_mem): Mark iterator
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index cfcb101..011624e 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3359,11 +3359,19 @@ tree
groktypename (typename)
tree typename;
{
+ tree specs, attrs;
+
if (TREE_CODE (typename) != TREE_LIST)
return typename;
- return grokdeclarator (TREE_VALUE (typename),
- TREE_PURPOSE (typename),
- TYPENAME, 0);
+
+ split_specs_attrs (TREE_PURPOSE (typename), &specs, &attrs);
+
+ 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. */
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 4967a09..5132b3f 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -669,6 +669,7 @@ primary:
{ $$ = build_function_call ($1, $3); }
| VA_ARG '(' expr_no_commas ',' typename ')'
{ $$ = build_va_arg ($3, groktypename ($5)); }
+
| CHOOSE_EXPR '(' expr_no_commas ',' expr_no_commas ',' expr_no_commas ')'
{
tree c;
@@ -1906,13 +1907,8 @@ enumerator:
typename:
declspecs_nosc
- { tree specs, attrs;
- pending_xref_error ();
- 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; }
+ { pending_xref_error ();
+ $<ttype>$ = $1; }
absdcl
{ $$ = build_tree_list ($<ttype>2, $3); }
;