aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 6b4aab8..561d0e2 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -26121,11 +26121,11 @@ cp_parser_std_attribute (cp_parser *parser, tree attr_ns)
attr_id = canonicalize_attr_name (attr_id);
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)) = gnu_identifier;
+ /* We used to treat C++11 noreturn attribute as equivalent to GNU's,
+ but no longer: we have to be able to tell [[noreturn]] and
+ __attribute__((noreturn)) apart. */
/* C++14 deprecated attribute is equivalent to GNU's. */
- else if (is_attribute_p ("deprecated", attr_id))
+ if (is_attribute_p ("deprecated", attr_id))
TREE_PURPOSE (TREE_PURPOSE (attribute)) = gnu_identifier;
/* C++17 fallthrough attribute is equivalent to GNU's. */
else if (is_attribute_p ("fallthrough", attr_id))