diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2023-08-16 21:29:46 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2023-08-17 08:42:45 +0100 |
commit | 51d702f3baf73aa4016b9798045d13318074ca1e (patch) | |
tree | 3ea75ccc4dcd8a19ba186b333b98e82169de2f55 | |
parent | 91315f23ba127ea4d1a584023bae34e143f6eb8c (diff) | |
download | gcc-51d702f3baf73aa4016b9798045d13318074ca1e.zip gcc-51d702f3baf73aa4016b9798045d13318074ca1e.tar.gz gcc-51d702f3baf73aa4016b9798045d13318074ca1e.tar.bz2 |
libstdc++: Disable PCH for tests that rely on include order
These tests expect to be able to #undef a feature test macro and then
include <version> to get it redefined. But if <version> has already been
included by the <bits/stdc++.h> PCH then including it again does nothing
and the macro remains undefined.
libstdc++-v3/ChangeLog:
* testsuite/24_iterators/move_iterator/p2520r0.cc: Add no_pch.
* testsuite/std/format/functions/format.cc: Likewise.
* testsuite/std/format/functions/format_c++23.cc: Likewise.
3 files changed, 3 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/24_iterators/move_iterator/p2520r0.cc b/libstdc++-v3/testsuite/24_iterators/move_iterator/p2520r0.cc index 883d6cc..e36ac57 100644 --- a/libstdc++-v3/testsuite/24_iterators/move_iterator/p2520r0.cc +++ b/libstdc++-v3/testsuite/24_iterators/move_iterator/p2520r0.cc @@ -1,5 +1,6 @@ // { dg-options "-std=gnu++20" } // { dg-do compile { target c++20 } } +// { dg-add-options no_pch } // Verify P2520R0 changes to move_iterator's iterator_concept, which we treat // as a DR against C++20. diff --git a/libstdc++-v3/testsuite/std/format/functions/format.cc b/libstdc++-v3/testsuite/std/format/functions/format.cc index a8d5b65..4db5202 100644 --- a/libstdc++-v3/testsuite/std/format/functions/format.cc +++ b/libstdc++-v3/testsuite/std/format/functions/format.cc @@ -1,5 +1,6 @@ // { dg-options "-std=gnu++20" } // { dg-do run { target c++20 } } +// { dg-add-options no_pch } #include <format> diff --git a/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc b/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc index f20c46c..3caa70f 100644 --- a/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc +++ b/libstdc++-v3/testsuite/std/format/functions/format_c++23.cc @@ -1,4 +1,5 @@ // { dg-do run { target c++23 } } +// { dg-add-options no_pch } // This test does not have -std=gnu++20 in dg-options so that format.cc // can be tested for e.g. -std=c++26 #include "format.cc" |