blob: b6b15cd1c66f2816c6f3dfb64ce799fbe496aa10 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
2From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3Date: Sat, 16 Mar 2024 09:50:00 +0100
4Subject: [PATCH] libcc1: fix <vector> include
5
6Use INCLUDE_VECTOR before including system.h, instead of directly
7including <vector>, to avoid running into poisoned identifiers.
8
9Signed-off-by: Dimitry Andric <dimitry@andric.com>
10
11libcc1/ChangeLog:
12
13 PR middle-end/111632
14 * libcc1plugin.cc: Fix include.
15 * libcp1plugin.cc: Fix include.
16---
17 libcc1/libcc1plugin.cc | 3 +--
18 libcc1/libcp1plugin.cc | 3 +--
19 2 files changed, 2 insertions(+), 4 deletions(-)
20
21diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
22index 72d17c3b81c..e64847466f4 100644
23--- a/libcc1/libcc1plugin.cc
24+++ b/libcc1/libcc1plugin.cc
25@@ -32,6 +32,7 @@
26 #undef PACKAGE_VERSION
27
28 #define INCLUDE_MEMORY
29+#define INCLUDE_VECTOR
30 #include "gcc-plugin.h"
31 #include "system.h"
32 #include "coretypes.h"
33@@ -69,8 +70,6 @@
34 #include "gcc-c-interface.h"
35 #include "context.hh"
36
37-#include <vector>
38-
39 using namespace cc1_plugin;
40
41
42diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
43index 0eff7c68d29..da68c5d0ac1 100644
44--- a/libcc1/libcp1plugin.cc
45+++ b/libcc1/libcp1plugin.cc
46@@ -33,6 +33,7 @@
47 #undef PACKAGE_VERSION
48
49 #define INCLUDE_MEMORY
50+#define INCLUDE_VECTOR
51 #include "gcc-plugin.h"
52 #include "system.h"
53 #include "coretypes.h"
54@@ -71,8 +72,6 @@
55 #include "rpc.hh"
56 #include "context.hh"
57
58-#include <vector>
59-
60 using namespace cc1_plugin;
61
62
63--
642.39.3
65