diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dc67610..1af1fd7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-04-06 Jason Merrill <jason@redhat.com> + + * parser.c (cp_parser_std_attribute): Treat [[noreturn]] like GNU + noreturn attribute. + 2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net> * parser.c (cp_parser_ref_qualifier_seq_opt): Move to diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index ed8eac8..856dc9a 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -20908,8 +20908,13 @@ cp_parser_std_attribute (cp_parser *parser) token = cp_lexer_peek_token (parser->lexer); } else - attribute = build_tree_list (build_tree_list (NULL_TREE, attr_id), - NULL_TREE); + { + attribute = build_tree_list (build_tree_list (NULL_TREE, attr_id), + NULL_TREE); + /* C++11 noreturn attribute is equivalent to GNU's. */ + if (is_attribute_p ("noreturn", attr_id)) + TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu"); + } /* Now parse the optional argument clause of the attribute. */ |