From 2bc78e3ce5231830fc35dbc3dc3ae16fb1aaf467 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 1 Nov 2016 22:10:38 -0400 Subject: [PATCH] c-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors. * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors. From-SVN: r241766 --- gcc/c-family/ChangeLog | 3 +++ gcc/c-family/c-cppbuiltin.c | 5 ++++- gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C | 4 ++-- gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C | 4 ++-- gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C | 4 ++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index efec6e16738..2d8430da2be 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,8 @@ 2016-11-01 Jason Merrill + * c-cppbuiltin.c (c_cpp_builtins): Update + __cpp_inheriting_constructors. + * c.opt (-fnew-inheriting-ctors): New. * c-opts.c: Default to on for ABI 11+. diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 7d689a9c0ff..f7959b2b143 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -904,7 +904,10 @@ c_cpp_builtins (cpp_reader *pfile) cpp_define (pfile, "__cpp_initializer_lists=200806"); cpp_define (pfile, "__cpp_delegating_constructors=200604"); cpp_define (pfile, "__cpp_nsdmi=200809"); - cpp_define (pfile, "__cpp_inheriting_constructors=200802"); + if (!flag_new_inheriting_ctors) + cpp_define (pfile, "__cpp_inheriting_constructors=200802"); + else + cpp_define (pfile, "__cpp_inheriting_constructors=201606"); cpp_define (pfile, "__cpp_ref_qualifiers=200710"); cpp_define (pfile, "__cpp_alias_templates=200704"); } diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C index 6928d6bcbd8..0e7ee840da1 100644 --- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C +++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C @@ -109,8 +109,8 @@ #ifndef __cpp_inheriting_constructors # error "__cpp_inheriting_constructors" -#elif __cpp_inheriting_constructors!= 200802 -# error "__cpp_inheriting_constructors != 200802" +#elif __cpp_inheriting_constructors!= 201606 +# error "__cpp_inheriting_constructors != 201606" #endif #ifndef __cpp_ref_qualifiers diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C index dc30a9b3cf8..d03066b709e 100644 --- a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C +++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C @@ -102,8 +102,8 @@ #ifndef __cpp_inheriting_constructors # error "__cpp_inheriting_constructors" -#elif __cpp_inheriting_constructors!= 200802 -# error "__cpp_inheriting_constructors != 200802" +#elif __cpp_inheriting_constructors!= 201606 +# error "__cpp_inheriting_constructors != 201606" #endif #ifndef __cpp_ref_qualifiers diff --git a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C index e023e6a622d..21321ea4586 100644 --- a/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C +++ b/gcc/testsuite/g++.dg/cpp1z/feat-cxx1z.C @@ -90,8 +90,8 @@ #ifndef __cpp_inheriting_constructors # error "__cpp_inheriting_constructors" -#elif __cpp_inheriting_constructors!= 200802 -# error "__cpp_inheriting_constructors != 200802" +#elif __cpp_inheriting_constructors!= 201606 +# error "__cpp_inheriting_constructors != 201606" #endif #ifndef __cpp_ref_qualifiers -- 2.30.2