From patchwork Sat Jun 8 08:57:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 249933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id DD9802C00A3 for ; Sat, 8 Jun 2013 18:57:53 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=UdJRXWXCHXSfv+r/TsHZBQbymjtF8bNnP1L71dF00bT i6D5VYTh+ONEMNqkUcDanT9iyxgUeCzhKz7UI7z0W9U4tqQn8mvs4TUREZpEunGL Ur8bZBKp4+yyr8uq//yJ+W5Ff7gpbxqjl+EnOCpRjCo2SQiADJDpRB2HszJTP0ZQ = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=UjJGAinXE9YGee+/3xs8zI0+wtQ=; b=RJPLFi+AQgosLm2Dt H5YylXoCSI8w09rbf/2PxLK8IDcJSFTjHERCO+fo/+EB/z1kSDoGvZ50ihZKG6ez SkmaHqr3YgJFzZfnuGQF0ywjSC1oNEIXPNXPi6v8/63SuEy9ObBIJi8FGiw2nPgJ cvZtZ/mWPeXqtV3g4+pncAvhpk= Received: (qmail 6325 invoked by alias); 8 Jun 2013 08:57:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 6285 invoked by uid 89); 8 Jun 2013 08:57:40 -0000 X-Spam-SWARE-Status: No, score=-5.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sat, 08 Jun 2013 08:57:39 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r588vYec031286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 8 Jun 2013 08:57:35 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r588vZYb021306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Jun 2013 08:57:36 GMT Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r588vZnj008515; Sat, 8 Jun 2013 08:57:35 GMT Received: from poldo4.casa (/79.25.196.67) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 08 Jun 2013 01:57:35 -0700 Message-ID: <51B2F1FD.2090600@oracle.com> Date: Sat, 08 Jun 2013 10:57:33 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Jason Merrill Subject: [C++ docs patch] PR 56544 X-Virus-Found: No Hi, the bug reminds us to update the documentation about the value of __cplusplus. I tentatively prepared the below, is it clear enough? We could probably apply something to the branch too, without the -std=c++1y bits, thus end simply like '; or @code{201103L}, per the 2011 C++ standard' or more verbosely say that with -std=c++1y too the value is 201103L. Thanks, Paolo. /////////////////// Index: doc/cpp.texi =================================================================== --- doc/cpp.texi (revision 199792) +++ doc/cpp.texi (working copy) @@ -1926,11 +1926,11 @@ facilities of the standard C library available. This macro is defined when the C++ compiler is in use. You can use @code{__cplusplus} to test whether a header is compiled by a C compiler or a C++ compiler. This macro is similar to @code{__STDC_VERSION__}, in -that it expands to a version number. A fully conforming implementation -of the 1998 C++ standard will define this macro to @code{199711L}. The -GNU C++ compiler is not yet fully conforming, so it uses @code{1} -instead. It is hoped to complete the implementation of standard C++ -in the near future. +that it expands to a version number. Depending on the language standard +selected, the value of the macro is @code{199711L}, as mandated by the +1998 C++ standard; @code{201103L}, per the 2011 C++ standard; an +unspecified value strictly larger than @code{201103L} for the experimental +languages enabled by @option{-std=c++1y} and @option{-std=gnu++1y}. @item __OBJC__ This macro is defined, with value 1, when the Objective-C compiler is in