public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Fix warnings when including rust-target.h information
@ 2022-06-08 12:05 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5801e165b3902f3376387649c632933c05647274
commit 5801e165b3902f3376387649c632933c05647274
Author: Philip Herron <philip.herron@embecosm.com>
Date: Fri Feb 11 10:18:24 2022 +0000
Fix warnings when including rust-target.h information
Diff:
---
gcc/rust/rust-session-manager.cc | 20 +-------------------
gcc/rust/rust-target.h | 9 +++++++--
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 4e140fddb56..5529fbf6931 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -19,21 +19,6 @@
#include "rust-session-manager.h"
#include "rust-diagnostics.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"
#include "rust-macro-expand.h"
@@ -47,10 +32,7 @@
#include "diagnostic.h"
#include "input.h"
-#include "target.h"
-#include "tm.h"
-#include "memmodel.h"
-#include "tm_p.h"
+#include "rust-target.h"
extern bool
saw_errors (void);
diff --git a/gcc/rust/rust-target.h b/gcc/rust/rust-target.h
index 9669c4a056f..743ac518ebb 100644
--- a/gcc/rust/rust-target.h
+++ b/gcc/rust/rust-target.h
@@ -18,9 +18,14 @@
#ifndef GCC_RUST_TARGET_H
#define GCC_RUST_TARGET_H
+#include "target.h"
+#include "tm.h"
+#include "memmodel.h"
+#include "tm_p.h"
+
// TODO: find out what this stuff actually does
#define DEFHOOKPOD(NAME, DOC, TYPE, INIT) TYPE NAME;
-#define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (*NAME) PARAMS;
+// #define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (*NAME) PARAMS;
#define DEFHOOK_UNDOC DEFHOOK
#define HOOKSTRUCT(FRAGMENT) FRAGMENT
@@ -39,4 +44,4 @@ extern struct gcc_targetrustm targetrustm;
extern void
rust_add_target_info (const char *key, const char *value);
-#endif
\ No newline at end of file
+#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-08 12:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:05 [gcc/devel/rust/master] Fix warnings when including rust-target.h information Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).