public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>,
	libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [committed] libstdc++: Fix uses of non-reserved names in headers
Date: Thu, 16 Feb 2023 12:45:25 +0100	[thread overview]
Message-ID: <Y+4XVVcFMbHG3imy@tucnak> (raw)
In-Reply-To: <Y+4J2qJQcf/dgEsK@tucnak>

On Thu, Feb 16, 2023 at 11:47:54AM +0100, Jakub Jelinek via Gcc-patches wrote:
> On Thu, Feb 16, 2023 at 10:30:30AM +0000, Jonathan Wakely via Gcc-patches wrote:
> > Tested powerpc64le-linux. Pushed to trunk.
> > 
> > These should be backported too.
> > 
> > -- >8 --
> > 
> > The non-reserved names 'val' and 'dest' were being used in our headers
> > but haven't been added to the 17_intro/names.cc test. That's because
> > they are used by <asm-generic/posix_types.h> and <netinet/tcp.h>
> > respecitvely on glibc-based systems.
> 
> So, can't we for such problematic names add hacks, like some directory
> which the test adds as -isystem before the standard ones and contains

Or do it the way you just did for PSTL, by including all the non-libstdc++
headers used in libstdc++ headers before defining all the macros for the
non-reserved names, hopefully the system headers use include guards and
won't be included again.

	Jakub


  reply	other threads:[~2023-02-16 11:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 10:30 Jonathan Wakely
2023-02-16 10:47 ` Jakub Jelinek
2023-02-16 11:45   ` Jakub Jelinek [this message]
2023-02-16 12:02     ` Jonathan Wakely
2023-02-16 12:00   ` Jonathan Wakely
2023-02-16 13:23 Maciej Cencora

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=Y+4XVVcFMbHG3imy@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@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).