libstdc++: Fix test that fails in C++20 mode [PR 99995]
The 17_intro/headers/c++1998/49745.cc test fails for C++20 mode with PCH enabled, because PCH makes it include <bits/stdc++.h>, which includes <atomic>, and that includes <unistd.h> in C++20 mode. The <unistd.h> dependency should go away when C++20 atomic waiting is stable, but will probably remain while the feature is experimental. Change the test to always include <bits/stdc++.h>, and XFAIL for C++20 and later. libstdc++-v3/ChangeLog: PR libstdc++/99995 * testsuite/17_intro/headers/c++1998/49745.cc: Include all standard headers and XFAIL for effective-target c++20.
This commit is contained in:
parent
c02c39fad0
commit
29046e02b8
@ -18,5 +18,7 @@
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// libstdc++/49745
|
||||
#include <iostream>
|
||||
#include <bits/stdc++.h>
|
||||
int truncate = 0;
|
||||
|
||||
// { dg-xfail-if "PR libstdc++/99995" { c++20 } }
|
||||
|
Loading…
Reference in New Issue
Block a user