From: Jonathan Wakely <jwakely@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Fix up FAIL in 17_intro/names.cc on glibc < 2.19 [PR108568]
Date: Fri, 27 Jan 2023 10:59:09 +0000 [thread overview]
Message-ID: <CACb0b4nbxEr3B56sEGMAZQcTDykuX-EPah=_vysFkfbmb9Cuiw@mail.gmail.com> (raw)
In-Reply-To: <Y9OZibQSy8DYxwbd@tucnak>
On Fri, 27 Jan 2023 at 09:29, Jakub Jelinek <jakub@redhat.com> wrote:
>
> Hi!
>
> On gcc112 which has glibc 2.17 I've noticed
> FAIL: 17_intro/names.cc (test for excess errors)
> FAIL: experimental/names.cc (test for excess errors)
> These are because glibc < 2.19 used __unused as field member of various structs,
> including mcontext_t in sys/ucontext.h on ppc64le.
> This was changed in glibc with
> https://gcc.gnu.org/pipermail/libc-alpha/2013-November/045766.html
> names.cc even has
> #ifdef __GLIBC_PREREQ
> #if ! __GLIBC_PREREQ(2, 19)
> // Glibc defines this prior to 2.19
> #undef __unused
> #endif
> #endif
> for it, but it doesn't work. The reason is that __GLIBC_PREREQ is defined in
> <features.h> but nothing included that header before this spot (it is included later
> from bits/stdc++.h).
>
> The following patch on Linux/Hurd conditionally includes features.h to get
> the needed macros before deciding if __unused should be undefined or not.
> If needed, I could use __GLIBC_PREREQ then but would need to check if it is
> defined and between 1996 and 1999 it wasn't.
>
> Tested on powerpc64le-linux with glibc 2.17 (where it fixes the
> regressions), on x86_64-linux with glibc 2.35 (where it still PASSes),
> plus on the latter with -E -dD on the test to verify __unused is just
> defined and not undefined later on, ok for trunk?
OK, thanks.
prev parent reply other threads:[~2023-01-27 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 9:29 Jakub Jelinek
2023-01-27 10:59 ` Jonathan Wakely [this message]
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='CACb0b4nbxEr3B56sEGMAZQcTDykuX-EPah=_vysFkfbmb9Cuiw@mail.gmail.com' \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--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).