]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Update outdated default -std in testing docs
authorJonathan Wakely <jwakely@redhat.com>
Fri, 8 Sep 2023 15:28:06 +0000 (16:28 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 18 Mar 2024 11:06:23 +0000 (11:06 +0000)
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)

libstdc++-v3/doc/html/manual/test.html
libstdc++-v3/doc/xml/manual/test.xml

index ef56a305687313a71aea79145f3f4b39256d6b4f..168e247c52f078e535929b6cebeeac5723f8afa9 100644 (file)
@@ -452,7 +452,7 @@ cat 27_io/objects/char/3_xin.in | a.out</pre></dd><dt><span class="term"><code c
     be run for a specific standard (and not later standards) using an
     effective target like <code class="literal">c++11_only</code>. However, this means
     the test will be skipped by default (because the default mode is
-    <code class="literal">gnu++14</code>), and so will only run when
+    <code class="literal">gnu++17</code>), and so will only run when
     <code class="option">-std=gnu++11</code> or <code class="option">-std=c++11</code> is used
     explicitly. For tests that require a specific standard it is better to
     use a <code class="literal">dg-options</code> directive:
@@ -466,13 +466,13 @@ cat 27_io/objects/char/3_xin.in | a.out</pre></dd><dt><span class="term"><code c
     Similarly, tests which depend on a newer standard than the default
     must use <code class="literal">dg-options</code> 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
-</p><pre class="programlisting">    // { dg-options "-std=gnu++17" }</pre><p>
+    For example, tests for C++20 features should use
+</p><pre class="programlisting">    // { dg-options "-std=gnu++20" }</pre><p>
     before any <code class="literal">dg-do</code> such as:
-</p><pre class="programlisting">    // { dg-do run "c++17" }</pre><p>
+</p><pre class="programlisting">    // { dg-do run { target c++20 } }</pre><p>
     The <code class="literal">dg-options</code> directive must come first, so that
     the <code class="literal">-std</code> flag has already been added to the options
-    before checking the <code class="literal">c++17</code> target.
+    before checking the <code class="literal">c++20</code> effective target.
   </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="tests.dg.examples"></a>Examples of Test Directives</h4></div></div></div><p>
 Example 1: Testing compilation only:
 </p><pre class="programlisting">
index ee00b06e3854ba23b458f3c9adbe3e685b4b6659..176661148100ccb46d5620498f5dd0919d3359a8 100644 (file)
@@ -749,7 +749,7 @@ cat 27_io/objects/char/3_xin.in | a.out</programlisting>
     be run for a specific standard (and not later standards) using an
     effective target like <literal>c++11_only</literal>. However, this means
     the test will be skipped by default (because the default mode is
-    <literal>gnu++14</literal>), and so will only run when
+    <literal>gnu++17</literal>), and so will only run when
     <option>-std=gnu++11</option> or <option>-std=c++11</option> is used
     explicitly. For tests that require a specific standard it is better to
     use a <literal>dg-options</literal> directive:
@@ -765,13 +765,13 @@ cat 27_io/objects/char/3_xin.in | a.out</programlisting>
     Similarly, tests which depend on a newer standard than the default
     must use <literal>dg-options</literal> 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
-<programlisting>    // { dg-options "-std=gnu++17" }</programlisting>
+    For example, tests for C++20 features should use
+<programlisting>    // { dg-options "-std=gnu++20" }</programlisting>
     before any <literal>dg-do</literal> such as:
-<programlisting>    // { dg-do run "c++17" }</programlisting>
+<programlisting>    // { dg-do run { target c++20 } }</programlisting>
     The <literal>dg-options</literal> directive must come first, so that
     the <literal>-std</literal> flag has already been added to the options
-    before checking the <literal>c++17</literal> target.
+    before checking the <literal>c++20</literal> effective target.
   </para>
 
 <section xml:id="tests.dg.examples"><info><title>Examples of Test Directives</title></info>