On 6 Mar 2024, at 15:57, FX Coudert <fxcoud...@gmail.com> wrote:
> 
>> Hmm I recall trying it and finding a problem - was there some different fix 
>> applied
>> in the end?
> 
> The bug is still open, I don’t think a patch was applied, and I don’t find 
> any email to the list stating what the problem could be.

The original patch (https://gcc.gnu.org/bugzilla/attachment.cgi?id=56010) still 
applies to the master branch. It turned out there is also a related problem in 
libcc1plugin.cc and libcp1plugin.cc <http://libcp1plugin.cc/>, which is fixed 
by https://gcc.gnu.org/bugzilla/attachment.cgi?id=57639 :

commit 49222b98ac8e30a4a042ada0ece3d7df93f049d2
Author: Dimitry Andric <dimi...@andric.com>
Date:   2024-03-06T23:46:27+01:00

    Fix libcc1plugin and libc1plugin to use INCLUDE_VECTOR before including
    system.h, instead of directly including <vector>, to avoid running into
    poisoned identifiers.

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;
 
 

Reply via email to