public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: Jason Merrill <jason@redhat.com>, Nathan Sidwell <nathan@acm.org>
Subject: [PATCH] doc: Update description of __GXX_EXPERIMENTAL_CXX0X__
Date: Wed, 19 May 2021 11:15:40 +0100	[thread overview]
Message-ID: <YKTlTG0bxRla2ymF@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

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.

OK for trunk and release branches?



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1568 bytes --]

commit 67041b36b1c84844acfe6d131cc501faae5027f0
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed May 19 11:11:11 2021

    doc: Update description of __GXX_EXPERIMENTAL_CXX0X__
    
    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.

diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index 2c109bbc5bd..4b065b651b0 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -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

             reply	other threads:[~2021-05-19 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 10:15 Jonathan Wakely [this message]
2021-05-19 17:02 ` Jason Merrill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKTlTG0bxRla2ymF@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=nathan@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).