aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-04-02 21:42:02 +0200
committerPhilip Herron <herron.philip@googlemail.com>2021-04-05 11:03:55 +0100
commit9de710767fee379d5b6837f76cd8245ec7fcfcff (patch)
treec7ee20e9d91b1d1a16da73dfa93f1e06ec0920a6 /gcc
parentda8f950b26fef3318eb6b05da1ca9d321486b54c (diff)
downloadgcc-9de710767fee379d5b6837f76cd8245ec7fcfcff.zip
gcc-9de710767fee379d5b6837f76cd8245ec7fcfcff.tar.gz
gcc-9de710767fee379d5b6837f76cd8245ec7fcfcff.tar.bz2
Address '[...]/gcc/rust/rust-target.h:23: error: "DEFHOOK" redefined' diagnostic [#336]
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/rust-session-manager.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 934b3023..06c2cb9 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -28,7 +28,17 @@
#include "tm.h"
#include "tm_p.h"
-#include "rust-target.h"
+//#include "rust-target.h"
+/*TODO This isn't (currently?) necessary, but if '#include'd after '#include "target.h"', causes:
+ In file included from [...]/gcc/rust/rust-session-manager.cc:31:
+ [...]/gcc/rust/rust-target.h:23: error: "DEFHOOK" redefined [-Werror]
+ 23 | #define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (*NAME) PARAMS;
+ |
+ In file included from [...]/gcc/rust/rust-session-manager.cc:27:
+ [...]/gcc/target.h:272: note: this is the location of the previous definition
+ 272 | #define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (* NAME) PARAMS;
+ |
+*/
#include "rust-lex.h"
#include "rust-parse.h"