021-libcc1-fix-vector-include.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
  2. From: Francois-Xavier Coudert <[email protected]>
  3. Date: Sat, 16 Mar 2024 09:50:00 +0100
  4. Subject: [PATCH] libcc1: fix <vector> include
  5. Use INCLUDE_VECTOR before including system.h, instead of directly
  6. including <vector>, to avoid running into poisoned identifiers.
  7. Signed-off-by: Dimitry Andric <[email protected]>
  8. libcc1/ChangeLog:
  9. PR middle-end/111632
  10. * libcc1plugin.cc: Fix include.
  11. * libcp1plugin.cc: Fix include.
  12. ---
  13. libcc1/libcc1plugin.cc | 3 +--
  14. libcc1/libcp1plugin.cc | 3 +--
  15. 2 files changed, 2 insertions(+), 4 deletions(-)
  16. --- a/libcc1/libcc1plugin.cc
  17. +++ b/libcc1/libcc1plugin.cc
  18. @@ -32,6 +32,7 @@
  19. #undef PACKAGE_VERSION
  20. #define INCLUDE_MEMORY
  21. +#define INCLUDE_VECTOR
  22. #include "gcc-plugin.h"
  23. #include "system.h"
  24. #include "coretypes.h"
  25. @@ -69,8 +70,6 @@
  26. #include "gcc-c-interface.h"
  27. #include "context.hh"
  28. -#include <vector>
  29. -
  30. using namespace cc1_plugin;
  31. --- a/libcc1/libcp1plugin.cc
  32. +++ b/libcc1/libcp1plugin.cc
  33. @@ -33,6 +33,7 @@
  34. #undef PACKAGE_VERSION
  35. #define INCLUDE_MEMORY
  36. +#define INCLUDE_VECTOR
  37. #include "gcc-plugin.h"
  38. #include "system.h"
  39. #include "coretypes.h"
  40. @@ -71,8 +72,6 @@
  41. #include "rpc.hh"
  42. #include "context.hh"
  43. -#include <vector>
  44. -
  45. using namespace cc1_plugin;