[PATCH/committed,02/20] sim: add ATTRIBUTE_FALLTHROUGH for local code

Message ID 20231221070127.19142-2-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,01/20] sim: signal: mark signal callback funcs as noreturn since they don't return |

Commit Message

Mike Frysinger Dec. 21, 2023, 7:01 a.m. UTC
  We'll replace various /* fall through */ comments so compilers can
actually understand what the code is doing.
---
 sim/common/defs.h | 3 +++
 sim/ppc/defs.h    | 3 +++
 2 files changed, 6 insertions(+)
  

Patch

diff --git a/sim/common/defs.h b/sim/common/defs.h
index 0f4062c2031d..01db1804b4cd 100644
--- a/sim/common/defs.h
+++ b/sim/common/defs.h
@@ -25,6 +25,9 @@ 
 /* Include gnulib's various configure tests.  */
 #include "gnulib/config.h"
 
+/* This comes from gnulib.  Export it until ansidecl.h handles it.  */
+#define ATTRIBUTE_FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH
+
 /* Reset macros that our config.h will provide.  */
 #undef PACKAGE
 #undef PACKAGE_BUGREPORT
diff --git a/sim/ppc/defs.h b/sim/ppc/defs.h
index 276063d4b74e..ab7a142b8994 100644
--- a/sim/ppc/defs.h
+++ b/sim/ppc/defs.h
@@ -23,6 +23,9 @@ 
 /* Include gnulib's various configure tests.  */
 #include "gnulib/config.h"
 
+/* This comes from gnulib.  Export it until ansidecl.h handles it.  */
+#define ATTRIBUTE_FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH
+
 /* Reset macros that our config.h will provide.  */
 #undef PACKAGE
 #undef PACKAGE_BUGREPORT