public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Fix test that fails due to name clash with old glibc [PR107979]
Date: Tue,  6 Dec 2022 21:41:00 +0000	[thread overview]
Message-ID: <20221206214100.239663-1-jwakely@redhat.com> (raw)

Tested x86_64-linux. Pushed to trunk.

-- >8 --

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.
---
 libstdc++-v3/testsuite/17_intro/names.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index ffbb199797b..963f74c11f3 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
-- 
2.38.1


                 reply	other threads:[~2022-12-06 21:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221206214100.239663-1-jwakely@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).