summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/cp/decl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/cp/decl2.c')
-rw-r--r--contrib/gcc/cp/decl2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c
index 7a3f7d5..9b7f88e 100644
--- a/contrib/gcc/cp/decl2.c
+++ b/contrib/gcc/cp/decl2.c
@@ -1363,7 +1363,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree, attrlist)
init = NULL_TREE;
value = grokdeclarator (declarator, declspecs, FIELD, init != 0,
- raises, attrlist);
+ raises, NULL_TREE);
if (! value)
return value; /* friend or constructor went bad. */
@@ -1477,6 +1477,10 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree, attrlist)
/* The corresponding pop_obstacks is in cp_finish_decl. */
push_obstacks_nochange ();
+ if (attrlist)
+ cplus_decl_attributes (value, TREE_PURPOSE (attrlist),
+ TREE_VALUE (attrlist));
+
if (TREE_CODE (value) == VAR_DECL)
{
/* We cannot call pushdecl here, because that would
OpenPOWER on IntegriCloud