]> git.ipfire.org Git - thirdparty/gcc.git/commit - libcpp/ChangeLog
Add support for -std=c++2a.
authorAndrew Sutton <andrew.n.sutton@gmail.com>
Fri, 15 Sep 2017 21:16:37 +0000 (21:16 +0000)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 15 Sep 2017 21:16:37 +0000 (23:16 +0200)
commit026a79f70cf33f836ea5275eda72d4870a3041e5
tree2f390353edc0761950168ed8a79be2315be52ac6
parent41dfa93fb8d0cfd3a64ba3e6eba9fbbe1d66090c
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.
(c_common_post_options): Adjust comments.
(set_std_cxx14, set_std_cxx17): Likewise.

* doc/cpp.texi (__cplusplus): Document value for -std=c++2a
or -std=gnu+2a.
* doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.

* lib/target-supports.exp (check_effective_target_c++17): Return
1 also if check_effective_target_c++2a.
(check_effective_target_c++17_down): New.
(check_effective_target_c++2a_only): New.
(check_effective_target_c++2a): New.
* g++.dg/cpp2a/cplusplus.C: New.

* 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 201709L for C++2a.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r252850
13 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-opts.c
gcc/c-family/c.opt
gcc/doc/cpp.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/cplusplus.C [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp
libcpp/ChangeLog
libcpp/include/cpplib.h
libcpp/init.c