aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorEdward Smith-Rowland <3dw4rd@verizon.net>2013-10-23 11:43:25 +0000
committerEdward Smith-Rowland <emsr@gcc.gnu.org>2013-10-23 11:43:25 +0000
commitfe15a1a7eb43bf486577d55e650222fb3479554f (patch)
treeafde1543e428548d165bc5ec5b019eb0735f30f8 /gcc/cp/parser.c
parent1099e56939f8c8a9e54d7a83087e25d87b01d1b2 (diff)
downloadgcc-fe15a1a7eb43bf486577d55e650222fb3479554f.zip
gcc-fe15a1a7eb43bf486577d55e650222fb3479554f.tar.gz
gcc-fe15a1a7eb43bf486577d55e650222fb3479554f.tar.bz2
Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
gcc/cp: 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs. * parser.c (cp_parser_std_attribute): Interpret [[deprecated]] as [[gnu::deprecated]]. gcc/testsuite: 2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net> Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs. * g++.dg/cpp1y/attr-deprecated.C: New. * g++.dg/cpp1y/attr-deprecated-neg.C: New. From-SVN: r203955
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 10a7b96..c5d19a4 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -21426,6 +21426,9 @@ cp_parser_std_attribute (cp_parser *parser)
/* C++11 noreturn attribute is equivalent to GNU's. */
if (is_attribute_p ("noreturn", attr_id))
TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu");
+ /* C++14 deprecated attribute is equivalent to GNU's. */
+ else if (cxx_dialect >= cxx1y && is_attribute_p ("deprecated", attr_id))
+ TREE_PURPOSE (TREE_PURPOSE (attribute)) = get_identifier ("gnu");
}
/* Now parse the optional argument clause of the attribute. */