diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index dbbfe1d..b410a6c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -12066,6 +12066,10 @@ cp_parser_condition (cp_parser* parser) /* Restore the saved message. */ parser->type_definition_forbidden_message = saved_message; + /* Gather the attributes that were provided with the + decl-specifiers. */ + tree prefix_attributes = type_specifiers.attributes; + cp_parser_maybe_commit_to_declaration (parser, type_specifiers.any_specifiers_p); @@ -12116,7 +12120,7 @@ cp_parser_condition (cp_parser* parser) /* Create the declaration. */ decl = start_decl (declarator, &type_specifiers, /*initialized_p=*/true, - attributes, /*prefix_attributes=*/NULL_TREE, + attributes, prefix_attributes, &pushed_scope); /* Parse the initializer. */ |