From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id BCCFE3876897; Fri, 8 Sep 2023 17:13:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCCFE3876897 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694193235; bh=V8bDHqqC51DVyytXhhiWp43HXDuupAuChIo+mrMFWkY=; h=From:To:Subject:Date:From; b=H0Q5oOklT0XyqopSp9RClc6V40+Gsk6kyJZigpV05ZxcrjCzJnWTw+z24vzTEbyjG 9p/5J3zhpzc/sjHvHvQDJ8RTjkvN+ScXIP84M3xVJxu6Lj/LZMhfvu+yYBDRmib+EY xyjJb9RqVKc8aEiqmGRSAC7/xiR9Bpg7KWYnasRg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-7785] libstdc++: Update outdated default -std in testing docs X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-13 X-Git-Oldrev: 82d09abf6a16fead726fe51d4bfe2424266b507d X-Git-Newrev: d8e351d8d656720f4037e0a86a4a6c73629e5307 Message-Id: <20230908171355.BCCFE3876897@sourceware.org> Date: Fri, 8 Sep 2023 17:13:55 +0000 (GMT) List-Id: https://gcc.gnu.org/g:d8e351d8d656720f4037e0a86a4a6c73629e5307 commit r13-7785-gd8e351d8d656720f4037e0a86a4a6c73629e5307 Author: Jonathan Wakely Date: Fri Sep 8 16:28:06 2023 +0100 libstdc++: Update outdated default -std in testing docs libstdc++-v3/ChangeLog: * doc/xml/manual/test.xml: Update reference to -std=gnu++14 as the default. * doc/html/manual/test.html: Regenerate. Diff: --- libstdc++-v3/doc/html/manual/test.html | 10 +++++----- libstdc++-v3/doc/xml/manual/test.xml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html index fadadf249bb3..a308ecf5996f 100644 --- a/libstdc++-v3/doc/html/manual/test.html +++ b/libstdc++-v3/doc/html/manual/test.html @@ -468,7 +468,7 @@ cat 27_io/objects/char/3_xin.in | a.out
c++11_only. However, this means the test will be skipped by default (because the default mode is - gnu++14), and so will only run when + gnu++17), and so will only run when -std=gnu++11 or -std=c++11 is used explicitly. For tests that require a specific standard it is better to use a dg-options directive: @@ -482,13 +482,13 @@ cat 27_io/objects/char/3_xin.in | a.out
dg-options instead of (or in addition to) an effective target, so that they are not skipped by default. - For example, tests for C++17 features should use -

    // { dg-options "-std=gnu++17" }

+ For example, tests for C++20 features should use +

    // { dg-options "-std=gnu++20" }

before any dg-do such as: -

    // { dg-do run "c++17" }

+

    // { dg-do run { target c++20 } }

The dg-options directive must come first, so that the -std flag has already been added to the options - before checking the c++17 target. + before checking the c++20 effective target.

Examples of Test Directives

Example 1: Testing compilation only:

diff --git a/libstdc++-v3/doc/xml/manual/test.xml b/libstdc++-v3/doc/xml/manual/test.xml
index 964c53d26322..9853a2848148 100644
--- a/libstdc++-v3/doc/xml/manual/test.xml
+++ b/libstdc++-v3/doc/xml/manual/test.xml
@@ -767,7 +767,7 @@ cat 27_io/objects/char/3_xin.in | a.out
     be run for a specific standard (and not later standards) using an
     effective target like c++11_only. However, this means
     the test will be skipped by default (because the default mode is
-    gnu++14), and so will only run when
+    gnu++17), and so will only run when
      or  is used
     explicitly. For tests that require a specific standard it is better to
     use a dg-options directive:
@@ -783,13 +783,13 @@ cat 27_io/objects/char/3_xin.in | a.out
     Similarly, tests which depend on a newer standard than the default
     must use dg-options instead of (or in addition to)
     an effective target, so that they are not skipped by default.
-    For example, tests for C++17 features should use
-    // { dg-options "-std=gnu++17" }
+    For example, tests for C++20 features should use
+    // { dg-options "-std=gnu++20" }
     before any dg-do such as:
-    // { dg-do run "c++17" }
+    // { dg-do run { target c++20 } }
     The dg-options directive must come first, so that
     the -std flag has already been added to the options
-    before checking the c++17 target.
+    before checking the c++20 effective target.
   
 
 
Examples of Test Directives