All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] disas/libvixl: Fix VIXL_FALLTHROUGH macro for QEMU
@ 2018-05-13  9:06 Stefan Weil
  2018-05-13  9:57 ` Stefan Weil
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Weil @ 2018-05-13  9:06 UTC (permalink / raw)
  To: Peter Maydell, QEMU Developer; +Cc: qemu-arm, Stefan Weil

It now prevents compiler warnings (enabled with -Wimplicit-fallthrough=
or -Wextra) as intended.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

I suggest to add and use a similar macro QEMU_FALLTHROUGH()
for the rest of the code and can provide a patch if that's
fine for everyone.

Regards
Stefan

 disas/libvixl/vixl/globals.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/disas/libvixl/vixl/globals.h b/disas/libvixl/vixl/globals.h
index 61dc9f7f7e..33c4231d91 100644
--- a/disas/libvixl/vixl/globals.h
+++ b/disas/libvixl/vixl/globals.h
@@ -112,6 +112,8 @@ inline void USE(T1, T2, T3, T4) {}
 // C++11(201103L).
 #if __has_warning("-Wimplicit-fallthrough") && __cplusplus >= 201103L
   #define VIXL_FALLTHROUGH() [[clang::fallthrough]] //NOLINT
+#elif defined(__GNUC__)
+  #define VIXL_FALLTHROUGH() __attribute__((fallthrough))
 #else
   #define VIXL_FALLTHROUGH() do {} while (0)
 #endif
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-05-18 15:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-13  9:06 [Qemu-devel] [PATCH] disas/libvixl: Fix VIXL_FALLTHROUGH macro for QEMU Stefan Weil
2018-05-13  9:57 ` Stefan Weil
2018-05-13 14:44   ` Peter Maydell
2018-05-15 12:13   ` Peter Maydell
2018-05-15 13:13     ` Stefan Weil
2018-05-15 13:25       ` Peter Maydell
2018-05-15 14:46         ` Richard Henderson
2018-05-15 14:51           ` Peter Maydell
2018-05-18 10:34           ` Peter Maydell
2018-05-18 15:57             ` Richard Henderson
2018-05-17 16:15       ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.