]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Do not include internal headers in tests
authorJonathan Wakely <jwakely@redhat.com>
Wed, 29 Oct 2025 15:28:52 +0000 (15:28 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 29 Oct 2025 17:22:39 +0000 (17:22 +0000)
commit623cd25e688583b47014d08dc0519780afd381e4
tree928d37f4e5607db598d175b20222a3d1bbc078ba
parentd0ff10a005eed4ca47d05bc0a93b3daf643025cb
libstdc++: Do not include internal headers in tests

For 42319.cc the PR says that <ios> 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 <bits/move.h> instead of
the correct header for std::move.

libstdc++-v3/ChangeLog:

* testsuite/17_intro/headers/c++2011/42319.cc: Include <ios>
instead of <bits/char_traits.h>. Add no_pch option. Remove
explicit -std=gnu++11 option.
* testsuite/30_threads/thread/swap/1.cc: Include <utility>
instead of <bits/move.h>.
libstdc++-v3/testsuite/17_intro/headers/c++2011/42319.cc
libstdc++-v3/testsuite/30_threads/thread/swap/1.cc