From 9de710767fee379d5b6837f76cd8245ec7fcfcff Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 2 Apr 2021 21:42:02 +0200 Subject: Address '[...]/gcc/rust/rust-target.h:23: error: "DEFHOOK" redefined' diagnostic [#336] --- gcc/rust/rust-session-manager.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc') 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" -- cgit v1.1