summaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
authorgiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-17 04:39:46 +0000
committergiovannibajo <giovannibajo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-17 04:39:46 +0000
commit4e16cce345a6de31d6b95a3c3995c71758c411be (patch)
treeeeb98e0397617f97d8f3e25d679968f164569739 /gcc/cp/decl2.c
parent9295ebe95446ac766e833032158ef588e7a11e3a (diff)
downloadgcc-4e16cce345a6de31d6b95a3c3995c71758c411be.tar.gz
PR c++/17743
* decl2.c (grokfield): Apply attributes also to TYPE_DECLs. PR c++/17743 * g++.dg/ext/attrib17.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89164 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 6562f2828c6..32ee18a55eb 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -879,6 +879,9 @@ grokfield (const cp_declarator *declarator,
if (processing_template_decl)
value = push_template_decl (value);
+ if (attrlist)
+ cplus_decl_attributes (&value, attrlist, 0);
+
return value;
}