diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-06-25 18:31:22 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-06-25 18:41:24 +0100 |
commit | e83a5a6b6893e910dc0b6b1cd034e1a258406c93 (patch) | |
tree | 858ffa89c86f9121d3672705939558fc331f15aa | |
parent | e0672017370b9a9362fda52ecffe33d1c9c41829 (diff) | |
download | gcc-e83a5a6b6893e910dc0b6b1cd034e1a258406c93.zip gcc-e83a5a6b6893e910dc0b6b1cd034e1a258406c93.tar.gz gcc-e83a5a6b6893e910dc0b6b1cd034e1a258406c93.tar.bz2 |
libstdc++: More workarounds in 17_intro/names.cc test [PR 97088]
Conditionally #undef some more names that are used in system headers.
libstdc++-v3/ChangeLog:
PR libstdc++/97088
* testsuite/17_intro/names.cc: Undef more names for newlib and
also for arm-none-linux-gnueabi.
* testsuite/experimental/names.cc: Disable PCH.
-rw-r--r-- | libstdc++-v3/testsuite/17_intro/names.cc | 14 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/experimental/names.cc | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 534dab7..805c100 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -208,6 +208,11 @@ #undef r #endif +#if defined (__linux__) && defined (__arm__) +// <sys/ucontext.h> defines fpregset_t::fpregs::j +#undef j +#endif + #if defined (__linux__) && defined (__powerpc__) // <asm/types.h> defines __vector128::u #undef u @@ -220,6 +225,15 @@ #if ! __has_include(<newlib.h>) // newlib's <sys/cdefs.h> defines __lockable as a macro, so we can't use it. # define __lockable cannot be used as an identifier +// newlib's <time.h> defines __tzrule_type with these members. +#undef d +#undef m +#undef n +#undef s +// newlib's <math.h> uses this for parameters +#undef x +// newlib's <inttypes.h> uses this for parameters +#undef j #endif #ifdef __sun__ diff --git a/libstdc++-v3/testsuite/experimental/names.cc b/libstdc++-v3/testsuite/experimental/names.cc index 34ec3ba..d695a25 100644 --- a/libstdc++-v3/testsuite/experimental/names.cc +++ b/libstdc++-v3/testsuite/experimental/names.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile { target c++11 } } +// { dg-add-options no_pch } // Define macros for some common variables names that we must not use for // naming variables, parameters etc. in the library. |