From: Jason Merrill Date: Fri, 14 Oct 2016 22:02:01 +0000 (-0400) Subject: c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases and __cpp_deduction_guides. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2045acd902fd8028514a72c58c98dba11749b8ad;p=gcc.git c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases and __cpp_deduction_guides. * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases and __cpp_deduction_guides. From-SVN: r241188 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index e4ba2de334d..475cd7d4860 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2016-10-14 Jason Merrill + + * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases + and __cpp_deduction_guides. + 2016-10-13 Jason Merrill * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables. diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 06b5aa3ac65..4179a32f356 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -936,6 +936,8 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_if_constexpr=201606"); cpp_define (pfile, "__cpp_capture_star_this=201603"); cpp_define (pfile, "__cpp_inline_variables=201606"); + cpp_define (pfile, "__cpp_aggregate_bases=201603"); + cpp_define (pfile, "__cpp_deduction_guides=201606"); } if (flag_concepts) /* Use a value smaller than the 201507 specified in diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index c86dbe2c911..e023e6a622d 100644 --- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -344,6 +344,18 @@ # error "__cpp_hex_float != 201603" #endif +#ifndef __cpp_aggregate_bases +# error "__cpp_aggregate_bases" +#elif __cpp_aggregate_bases != 201603 +# error "__cpp_aggregate_bases != 201603" +#endif + +#ifndef __cpp_deduction_guides +# error "__cpp_deduction_guides" +#elif __cpp_deduction_guides != 201606 +# error "__cpp_deduction_guides != 201606" +#endif + #ifndef __cpp_if_constexpr # error "__cpp_if_constexpr" #elif __cpp_if_constexpr != 201606