From: Jonathan Wakely Date: Wed, 29 Oct 2025 15:28:52 +0000 (+0000) Subject: libstdc++: Do not include internal headers in tests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=623cd25e688583b47014d08dc0519780afd381e4;p=thirdparty%2Fgcc.git libstdc++: Do not include internal headers in tests For 42319.cc the PR says that reproduced the problem, so let's include that instead. We should also use the no_pch option because otherwise the test is including everything anyway, and so fails to check that the char_traits.h header can be included in isolation. There's also no reason to use an explicit -std=gnu++11 option, we can test it for all modes instead. For the thread test there's no reason to use instead of the correct header for std::move. libstdc++-v3/ChangeLog: * testsuite/17_intro/headers/c++2011/42319.cc: Include instead of . Add no_pch option. Remove explicit -std=gnu++11 option. * testsuite/30_threads/thread/swap/1.cc: Include instead of . --- diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc index cd576cad2979..350a5481dbd4 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-std=gnu++11" } +// { dg-add-options no_pch } // Copyright (C) 2009-2025 Free Software Foundation, Inc. // @@ -19,4 +19,4 @@ // . // libstdc++/42319 -#include +#include diff --git a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc index 9616b150d240..b1fde096e67d 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc @@ -23,7 +23,7 @@ #include #include -#include // std::move +#include // std::move #include void f() { }