From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 438D73858410; Mon, 18 Mar 2024 14:04:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 438D73858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770663; bh=ahtG6InHxslopJ89qj4VOl4H7M984lyMPsFybszykvU=; h=From:To:Subject:Date:From; b=XGjf16w5sXZYaXbMuTZPQuuzOBA4rNNvvNjU2vNBK4trXx8/ZDEnnfZocjYFVagFu gpQWNOHTzbpJa8EfUixzPes5SmV/0j7Cb92qXRt+qdgxIj5lMuviZH7lO0CnPgBwKF cU11msARWFWTd8GtGAEOIw2+ifYe7T/+3NyhQg78= 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 r12-10233] libstdc++: Update outdated default -std in testing docs X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 02a64d50d7780184428630e748fc301cb04ef96b X-Git-Newrev: 8364faf223e54c0ddf7ab35eda158533e5195bb6 Message-Id: <20240318140423.438D73858410@sourceware.org> Date: Mon, 18 Mar 2024 14:04:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8364faf223e54c0ddf7ab35eda158533e5195bb6 commit r12-10233-g8364faf223e54c0ddf7ab35eda158533e5195bb6 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. (cherry picked from commit d8e351d8d656720f4037e0a86a4a6c73629e5307) 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 ef56a305687..168e247c52f 100644 --- a/libstdc++-v3/doc/html/manual/test.html +++ b/libstdc++-v3/doc/html/manual/test.html @@ -452,7 +452,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: @@ -466,13 +466,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 ee00b06e385..17666114810 100644
--- a/libstdc++-v3/doc/xml/manual/test.xml
+++ b/libstdc++-v3/doc/xml/manual/test.xml
@@ -749,7 +749,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:
@@ -765,13 +765,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