aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2024-03-16 09:50:00 +0100
committerIain Sandoe <iain@sandoe.co.uk>2024-06-11 19:06:42 +0100
commit8f11ed1c58e14421ba4be1652764fc47fdce8dc7 (patch)
tree208b0abfb7620f37bd307c7e56674284956d545f
parentd30afaae6764379a63c22459b40aaecfa82b0fc4 (diff)
downloadgcc-8f11ed1c58e14421ba4be1652764fc47fdce8dc7.zip
gcc-8f11ed1c58e14421ba4be1652764fc47fdce8dc7.tar.gz
gcc-8f11ed1c58e14421ba4be1652764fc47fdce8dc7.tar.bz2
libcc1: fix <vector> include
Use INCLUDE_VECTOR before including system.h, instead of directly including <vector>, to avoid running into poisoned identifiers. Signed-off-by: Dimitry Andric <dimitry@andric.com> PR middle-end/111632 libcc1/ChangeLog: * libcc1plugin.cc: Fix include. * libcp1plugin.cc: Fix include. (cherry picked from commit 5213047b1d50af63dfabb5e5649821a6cb157e33)
-rw-r--r--libcc1/libcc1plugin.cc3
-rw-r--r--libcc1/libcp1plugin.cc3
2 files changed, 2 insertions, 4 deletions
diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
index bdd0bda..8d96667 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 e2d5039..6c93e91 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;