public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Dimitry Andric <dimitry@andric.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix libcc1plugin and libc1plugin to avoid poisoned identifiers
Date: Wed, 13 Mar 2024 11:30:20 +0000	[thread overview]
Message-ID: <ADF20A0C-91FD-422B-9C18-06D8E769BFE0@sandoe.co.uk> (raw)
In-Reply-To: <15D35FFE-1E97-4047-A75C-F13D25826E15@andric.com>

Hi Dimitry,

> On 7 Mar 2024, at 16:48, Dimitry Andric <dimitry@andric.com> wrote:
> 
> Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632
> 
> Use INCLUDE_VECTOR before including system.h, instead of directly
> including <vector>, to avoid running into poisoned identifiers.

I would say that the patch itself is obvious, but you have not mentioned how
it was tested?

thanks
Iain

> 
> Signed-off-by: Dimitry Andric <dimitry@andric.com>
> ---
> libcc1/libcc1plugin.cc | 3 +--
> libcc1/libcp1plugin.cc | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
> 
> 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;
> 
> 
> -- 
> 2.43.2
> 


  reply	other threads:[~2024-03-13 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 16:48 Dimitry Andric
2024-03-13 11:30 ` Iain Sandoe [this message]
2024-03-13 12:10   ` Dimitry Andric
2024-03-16  8:53 FX Coudert

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=ADF20A0C-91FD-422B-9C18-06D8E769BFE0@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=dimitry@andric.com \
    --cc=gcc-patches@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).