aboutsummaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2024-03-16 09:50:00 +0100
committerFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2024-03-16 09:50:00 +0100
commit5213047b1d50af63dfabb5e5649821a6cb157e33 (patch)
treece759f4c4e3f78c811fa24752aa2161e6a72e05b /libcc1
parent53fb2cf75965e4dbcf145a12d8ae41f4667a8498 (diff)
downloadgcc-upstream-5213047b1d50af63dfabb5e5649821a6cb157e33.tar.gz
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> libcc1/ChangeLog: PR middle-end/111632 * libcc1plugin.cc: Fix include. * libcp1plugin.cc: Fix include.
Diffstat (limited to 'libcc1')
-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 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;