diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-05-20 15:38:21 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-05-20 15:38:21 +0100 |
commit | 7f67becc9854ac159c6970951108e5d3e2afa6e8 (patch) | |
tree | 0a59f2b3a3fe5ef34cd738ca5d343c92aa1411b5 | |
parent | 6db76e48c18bae5432634a83643542dacf2273e9 (diff) | |
download | gcc-7f67becc9854ac159c6970951108e5d3e2afa6e8.zip gcc-7f67becc9854ac159c6970951108e5d3e2afa6e8.tar.gz gcc-7f67becc9854ac159c6970951108e5d3e2afa6e8.tar.bz2 |
Fix failing tests for use of non-reserved names
Defining 'ptr' fails on Solaris because it's used in <netdb.h>.
Including the Filesystem TS header fails if the TS support wasn't
enabled by configure.
* testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
* testsuite/experimental/names.cc: Include <experimental/filesystem>
conditionally.
From-SVN: r271421
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/17_intro/names.cc | 5 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/experimental/names.cc | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c5b8d60..98a676e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2019-05-20 Jonathan Wakely <jwakely@redhat.com> + * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris. + * testsuite/experimental/names.cc: Include <experimental/filesystem> + conditionally. + PR c++/90532 Ensure __is_constructible(T[]) is false * include/std/type_traits (__do_is_default_constructible_impl) (__is_default_constructible_atom, __is_default_constructible_safe): diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 20123a4..66c639f 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -187,4 +187,9 @@ #undef y #endif +#ifdef __sun__ +// See https://gcc.gnu.org/ml/libstdc++/2019-05/msg00175.html +#undef ptr +#endif + #include <bits/stdc++.h> diff --git a/libstdc++-v3/testsuite/experimental/names.cc b/libstdc++-v3/testsuite/experimental/names.cc index e97baf3..0746ca3 100644 --- a/libstdc++-v3/testsuite/experimental/names.cc +++ b/libstdc++-v3/testsuite/experimental/names.cc @@ -22,7 +22,9 @@ #include "../17_intro/names.cc" // Filesystem -#include <experimental/filesystem> +#if __has_include(<experimental/filesystem>) +# include <experimental/filesystem> +#endif // Library Fundamentals #include <experimental/algorithm> #include <experimental/any> |