On 2017.07.20 at 19:04 +0200, Markus Trippelsdorf wrote: > On 2017.07.20 at 09:33 -0400, Andrew Sutton wrote: > > This adds a new C++ dialect, enabled by -std=c++2a. > > > > libcpp/ > > Add support for C++2a. > > * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A. > > * init.c (lang_defaults): Add rows for CXX2A and GNUCXX2A. > > (cpp_init_builtins): Set __cplusplus to 201707L for C++2x. > > > > gcc/c-family/ > > Add support for -std=c++2a. > > * c-common.h (cxx_dialect): Add cxx2a as a dialect. > > * opt.c: Add options for -std=c++2a and -std=gnu++2a. > > * c-opts.c (set_std_cxx2a): New. > > (c_common_handle_option): Set options when -std=c++2a is enabled. > > > > gcc/testsuite/ > > New test for -std=c++2a. > > * g++.dg/cpp2a/cplusplus.C: New. > > Perhaps you should enable -fconcepts by default?
On top of your patch: diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index eed9e72b17f0..a923c3e9eedf 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -1626,6 +1626,7 @@ set_std_cxx2a (int iso) flag_isoc94 = 1; flag_isoc99 = 1; flag_isoc11 = 1; + flag_concepts = 1; cxx_dialect = cxx2a; lang_hooks.name = "GNU C++17"; /* Pretend C++17 until standardization. */ } -- Markus