Skip to content

Commit e3e9d04

Browse files
fxcoudertstephanosio
authored andcommitted
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 5213047) (cherry picked from commit 8f11ed1) Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent f141243 commit e3e9d04

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

libcc1/libcc1plugin.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#undef PACKAGE_VERSION
3333

3434
#define INCLUDE_MEMORY
35+
#define INCLUDE_VECTOR
3536
#include "gcc-plugin.h"
3637
#include "system.h"
3738
#include "coretypes.h"
@@ -69,8 +70,6 @@
6970
#include "gcc-c-interface.h"
7071
#include "context.hh"
7172

72-
#include <vector>
73-
7473
using namespace cc1_plugin;
7574

7675

libcc1/libcp1plugin.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#undef PACKAGE_VERSION
3434

3535
#define INCLUDE_MEMORY
36+
#define INCLUDE_VECTOR
3637
#include "gcc-plugin.h"
3738
#include "system.h"
3839
#include "coretypes.h"
@@ -71,8 +72,6 @@
7172
#include "rpc.hh"
7273
#include "context.hh"
7374

74-
#include <vector>
75-
7675
using namespace cc1_plugin;
7776

7877

0 commit comments

Comments
 (0)