--- gcc/cp/decl2.c 2018/04/24 18:27:03 1.1.1.2 +++ gcc/cp/decl2.c 2018/04/24 18:33:17 1.1.1.3 @@ -1363,7 +1363,7 @@ grokfield (declarator, declspecs, raises 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 /* 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