diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-12-05 21:44:26 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-12-06 21:38:46 +0000 |
commit | 2a23b93f944fa78d4284eb5687051c224e5ab08f (patch) | |
tree | e14c1b5edfd308fc6749b4b4ebe41937597ad302 | |
parent | 9cce91a63dcc40cb39e68f6a771e891e51c51946 (diff) | |
download | gcc-2a23b93f944fa78d4284eb5687051c224e5ab08f.zip gcc-2a23b93f944fa78d4284eb5687051c224e5ab08f.tar.gz gcc-2a23b93f944fa78d4284eb5687051c224e5ab08f.tar.bz2 |
libstdc++: Fix test that fails due to name clash with old glibc [PR107979]
This test was recently modified to check that the library doesn't use
__unused anywhere, because that's a macro in newlib. But it's also a
macro in old versions of glibc, so the test now fails for those targets.
Disable that check for those targets as well as for newlib.
libstdc++-v3/ChangeLog:
PR libstdc++/107979
* testsuite/17_intro/names.cc: Do not check __unused on old
Glibc versions.
-rw-r--r-- | libstdc++-v3/testsuite/17_intro/names.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index ffbb199..963f74c 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -241,6 +241,13 @@ #undef y #endif +#ifdef __GLIBC_PREREQ +#if ! __GLIBC_PREREQ(2, 19) +// Glibc defines this prior to 2.19 +#undef __unused +#endif +#endif + #if __has_include(<newlib.h>) // newlib's <sys/cdefs.h> defines these as macros. #undef __lockable |