]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
doc: Update description of __GXX_EXPERIMENTAL_CXX0X__
authorJonathan Wakely <jwakely@redhat.com>
Wed, 19 May 2021 10:11:11 +0000 (11:11 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 19 May 2021 17:52:45 +0000 (18:52 +0100)
This macro has been obsolete for years, and C++0x features are no longer
experimental or liable to be removed.

gcc/ChangeLog:

* doc/cpp.texi (Common Predefined Macros): Update documentation
for the __GXX_EXPERIMENTAL_CXX0X__ macro.

(cherry picked from commit 9b50282b0dcf79d3141979e466465a23d1816166)

gcc/doc/cpp.texi

index 2c109bbc5bd50a8b07e825a9af29fe2085647920..4b065b651b0fe253c2786a4a572ed62200d87f66 100644 (file)
@@ -2312,11 +2312,13 @@ mechanism based on @code{setjmp} and @code{longjmp} for exception
 handling.
 
 @item __GXX_EXPERIMENTAL_CXX0X__
-This macro is defined when compiling a C++ source file with the option
-@option{-std=c++0x} or @option{-std=gnu++0x}. It indicates that some
-features likely to be included in C++0x are available. Note that these
-features are experimental, and may change or be removed in future
-versions of GCC.
+This macro is defined when compiling a C++ source file with C++11 features
+enabled, i.e., for all C++ language dialects except @option{-std=c++98}
+and @option{-std=gnu++98}. This macro is obsolete, but can be used to
+detect experimental C++0x features in very old versions of GCC. Since
+GCC 4.7.0 the @code{__cplusplus} macro is defined correctly, so most
+code should test @code{__cplusplus >= 201103L} instead of using this
+macro.
 
 @item __GXX_WEAK__
 This macro is defined when compiling a C++ source file.  It has the