]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Disable PCH for tests that rely on include order
authorJonathan Wakely <jwakely@redhat.com>
Wed, 16 Aug 2023 20:29:46 +0000 (21:29 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 17 Aug 2023 07:42:45 +0000 (08:42 +0100)
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.

libstdc++-v3/testsuite/24_iterators/move_iterator/p2520r0.cc
libstdc++-v3/testsuite/std/format/functions/format.cc
libstdc++-v3/testsuite/std/format/functions/format_c++23.cc

index 883d6cc09e00f96f0df523febdc5d33459180a8b..e36ac574a8ecba4a9d0f2a33f9bc7ca28371a813 100644 (file)
@@ -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.
index a8d5b652a5eb60e3480c73c686946e8264762f04..4db5202815d6262e83d50ea60818e2a4e7669e44 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-options "-std=gnu++20" }
 // { dg-do run { target c++20 } }
+// { dg-add-options no_pch }
 
 #include <format>
 
index f20c46cd7e3864c79db4f26a64b4f42b8c0f558a..3caa70fcdf2dfd77a2921fd35ff00b609d24b7d4 100644 (file)
@@ -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"