This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/7] gdbserver: avoid empty structs when not using GCC
- From: Mircea Gherzan <mircea dot gherzan at intel dot com>
- To: tromey at redhat dot com, palves at redhat dot com, jan dot kratochvil at redhat dot com
- Cc: gdb-patches at sourceware dot org, Mircea Gherzan <mircea dot gherzan at intel dot com>
- Date: Thu, 27 Jun 2013 10:43:38 +0200
- Subject: [PATCH 3/7] gdbserver: avoid empty structs when not using GCC
- References: <1372322622-3216-1-git-send-email-mircea dot gherzan at intel dot com>
2013-06-25 Mircea Gherzan <mircea.gherzan@intel.com>
gdbserver/
* notif.h (notif_event): Add a dummy member to avoid compiler
errors when not using GCC.
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
---
gdb/gdbserver/notif.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/gdbserver/notif.h b/gdb/gdbserver/notif.h
index 608b763..ed3c714 100644
--- a/gdb/gdbserver/notif.h
+++ b/gdb/gdbserver/notif.h
@@ -27,6 +27,10 @@
typedef struct notif_event
{
+#ifndef __GNUC__
+ /* C requires that a struct or union has at least one member. */
+ char dummy;
+#endif
} *notif_event_p;
DECLARE_QUEUE_P (notif_event_p);
--
1.7.12.4