aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c14
1 files changed, 11 insertions, 3 deletions
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. */