From 7f67becc9854ac159c6970951108e5d3e2afa6e8 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 May 2019 15:38:21 +0100 Subject: [PATCH] Fix failing tests for use of non-reserved names Defining 'ptr' fails on Solaris because it's used in . 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 conditionally. From-SVN: r271421 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/testsuite/17_intro/names.cc | 5 +++++ libstdc++-v3/testsuite/experimental/names.cc | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c5b8d6016b0..98a676ec5c0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2019-05-20 Jonathan Wakely + * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris. + * testsuite/experimental/names.cc: Include + 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 20123a41287..66c639ff3a3 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 diff --git a/libstdc++-v3/testsuite/experimental/names.cc b/libstdc++-v3/testsuite/experimental/names.cc index e97baf3d5bd..0746ca34e06 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 +#if __has_include() +# include +#endif // Library Fundamentals #include #include -- 2.30.2