[gcc r11-11550] libcc1: fix <vector> include
Iain D Sandoe
iains@gcc.gnu.org
Sat Jun 29 10:15:24 GMT 2024
https://gcc.gnu.org/g:378f50f4c32af5111893989bfc5a191d3aa27bb7
commit r11-11550-g378f50f4c32af5111893989bfc5a191d3aa27bb7
Author: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Date: Sat Mar 16 09:50:00 2024 +0100
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.
(cherry picked from commit 5213047b1d50af63dfabb5e5649821a6cb157e33)
Diff:
---
libcc1/libcc1plugin.cc | 2 ++
libcc1/libcp1plugin.cc | 2 ++
2 files changed, 4 insertions(+)
diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
index e80ecd8f4b3..e58fa55c0f5 100644
--- a/libcc1/libcc1plugin.cc
+++ b/libcc1/libcc1plugin.cc
@@ -31,6 +31,8 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
+#define INCLUDE_MEMORY
+#define INCLUDE_VECTOR
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
index 27a6175e34e..378c65d43c2 100644
--- a/libcc1/libcp1plugin.cc
+++ b/libcc1/libcp1plugin.cc
@@ -32,6 +32,8 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
+#define INCLUDE_MEMORY
+#define INCLUDE_VECTOR
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
More information about the Gcc-cvs
mailing list