summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-15 21:16:37 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-15 21:16:37 +0000
commit96bf2948e4a8fc6f288016132f2486bdc08f5712 (patch)
tree2f390353edc0761950168ed8a79be2315be52ac6 /gcc/doc
parent561fdd794bd16c7504d08c3f552d6d7c6eb80c6b (diff)
downloadgcc-96bf2948e4a8fc6f288016132f2486bdc08f5712.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@252850 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/cpp.texi5
-rw-r--r--gcc/doc/invoke.texi10
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index 8e9cba378c3..52f2606eadc 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -1877,7 +1877,10 @@ selected, the value of the macro is
@code{199711L} for the 1998 C++ standard,
@code{201103L} for the 2011 C++ standard,
@code{201402L} for the 2014 C++ standard,
-@code{201703L} for the 2017 C++ standard.
+@code{201703L} for the 2017 C++ standard,
+or an unspecified value strictly larger than @code{201703L} for the
+experimental languages enabled by @option{-std=c++2a} and
+@option{-std=gnu++2a}.
@item __OBJC__
This macro is defined, with value 1, when the Objective-C compiler is in
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 60650c83917..204c9b77b61 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1880,6 +1880,16 @@ The name @samp{c++1z} is deprecated.
@itemx gnu++1z
GNU dialect of @option{-std=c++17}.
The name @samp{gnu++1z} is deprecated.
+
+@item c++2a
+The next revision of the ISO C++ standard, tentatively planned for
+2020. Support is highly experimental, and will almost certainly
+change in incompatible ways in future releases.
+
+@item gnu++2a
+GNU dialect of @option{-std=c++2a}. Support is highly experimental,
+and will almost certainly change in incompatible ways in future
+releases.
@end table
@item -fgnu89-inline