Patchwork docs for __STRICT_ANSI__ should mention C++

login
register
mail settings
Submitter Jonathan Wakely
Date Jan. 8, 2012, 12:58 p.m.
Message ID <CAH6eHdRdh=+2aOWMcjjH0UAhGCpw_XC5PZTDYbvJKPJKof_C_A@mail.gmail.com>
Download mbox | patch
Permalink /patch/134906/
State New
Headers show

Comments

Jonathan Wakely - Jan. 8, 2012, 12:58 p.m.
2012-01-08  Jonathan Wakely  <jwakely.gcc@gmail.com>

        * doc/cpp.texi (Predefined Macros): __STRICT_ANSI__ is defined
        for -std=c++98 and -std=c++11 too.

OK for trunk?
Joseph S. Myers - Jan. 8, 2012, 1:17 p.m.
On Sun, 8 Jan 2012, Jonathan Wakely wrote:

> 2012-01-08  Jonathan Wakely  <jwakely.gcc@gmail.com>
> 
>         * doc/cpp.texi (Predefined Macros): __STRICT_ANSI__ is defined
>         for -std=c++98 and -std=c++11 too.
> 
> OK for trunk?

OK.

Patch

Index: doc/cpp.texi
===================================================================
--- doc/cpp.texi	(revision 182988)
+++ doc/cpp.texi	(working copy)
@@ -2020,8 +2020,8 @@  testing @code{@w{(__GNUC__ && __cplusplu
 
 @item __STRICT_ANSI__
 GCC defines this macro if and only if the @option{-ansi} switch, or a
-@option{-std} switch specifying strict conformance to some version of ISO C,
-was specified when GCC was invoked.  It is defined to @samp{1}.
+@option{-std} switch specifying strict conformance to some version of ISO C
+or ISO C++, was specified when GCC was invoked.  It is defined to @samp{1}.
 This macro exists primarily to direct GNU libc's header files to
 restrict their definitions to the minimal set found in the 1989 C
 standard.