From: Iain Sandoe <iain@sandoe.co.uk>
To: Dimitry Andric <dimitry@andric.com>
Cc: FX Coudert <fxcoudert@gmail.com>, Sam James <sam@gentoo.org>,
Richard Biener <rguenther@suse.de>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
Date: Thu, 7 Mar 2024 07:11:03 +0000 [thread overview]
Message-ID: <F5F0BE77-FE5F-4980-A8C6-04A06F0181B3@sandoe.co.uk> (raw)
In-Reply-To: <94D29D3A-F402-4844-AA80-F75E9EDBDB0A@andric.com>
Hi Dimitry, folks,
> On 6 Mar 2024, at 23:02, Dimitry Andric <dimitry@andric.com> wrote:
>
> On 6 Mar 2024, at 15:57, FX Coudert <fxcoudert@gmail.com> wrote:
>>
>>> Hmm I recall trying it and finding a problem - was there some different fix applied
>>> in the end?
>>
>> The bug is still open, I don’t think a patch was applied, and I don’t find any email to the list stating what the problem could be.
>
> The original patch (https://gcc.gnu.org/bugzilla/attachment.cgi?id=56010) still applies to the master branch.
I have retested this on various Darwin versions and confirm that it fixes the bootstrap fail on x86_64-darwin23 and works OK on other versions (including 32b hosts).
+1 for applying this soon.
====
the second patch really needs to be posted separately to make review easier (if we were not in stage 4, I’d say it’s ‘obvious’ anyway).
thanks
Iain
> It turned out there is also a related problem in libcc1plugin.cc and libcp1plugin.cc <http://libcp1plugin.cc/>, which is fixed by https://gcc.gnu.org/bugzilla/attachment.cgi?id=57639 :
>
> commit 49222b98ac8e30a4a042ada0ece3d7df93f049d2
> Author: Dimitry Andric <dimitry@andric.com>
> Date: 2024-03-06T23:46:27+01:00
>
> Fix libcc1plugin and libc1plugin to use INCLUDE_VECTOR before including
> system.h, instead of directly including <vector>, to avoid running into
> poisoned identifiers.
>
> diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
> index 72d17c3b81c..e64847466f4 100644
> --- a/libcc1/libcc1plugin.cc
> +++ b/libcc1/libcc1plugin.cc
> @@ -32,6 +32,7 @@
> #undef PACKAGE_VERSION
>
> #define INCLUDE_MEMORY
> +#define INCLUDE_VECTOR
> #include "gcc-plugin.h"
> #include "system.h"
> #include "coretypes.h"
> @@ -69,8 +70,6 @@
> #include "gcc-c-interface.h"
> #include "context.hh"
>
> -#include <vector>
> -
> using namespace cc1_plugin;
>
>
> diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
> index 0eff7c68d29..da68c5d0ac1 100644
> --- a/libcc1/libcp1plugin.cc
> +++ b/libcc1/libcp1plugin.cc
> @@ -33,6 +33,7 @@
> #undef PACKAGE_VERSION
>
> #define INCLUDE_MEMORY
> +#define INCLUDE_VECTOR
> #include "gcc-plugin.h"
> #include "system.h"
> #include "coretypes.h"
> @@ -71,8 +72,6 @@
> #include "rpc.hh"
> #include "context.hh"
>
> -#include <vector>
> -
> using namespace cc1_plugin;
>
>
>
next prev parent reply other threads:[~2024-03-07 7:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 13:42 FX Coudert
2024-03-06 13:54 ` Sam James
2024-03-06 14:35 ` Iain Sandoe
2024-03-06 14:57 ` FX Coudert
2024-03-06 23:02 ` Dimitry Andric
2024-03-07 7:11 ` Iain Sandoe [this message]
2024-03-07 9:51 ` Richard Biener
2024-03-07 13:40 ` FX Coudert
2024-04-03 9:01 ` Iain Sandoe
2024-04-03 9:38 ` Richard Biener
-- strict thread matches above, loose matches on Subject: below --
2023-09-28 16:37 Dimitry Andric
2024-01-30 16:19 ` Jonathan Wakely
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=F5F0BE77-FE5F-4980-A8C6-04A06F0181B3@sandoe.co.uk \
--to=iain@sandoe.co.uk \
--cc=dimitry@andric.com \
--cc=fxcoudert@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
--cc=sam@gentoo.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).