From cfbf6f4ce2c89b81154a2f47abebaeeea19bff96 Mon Sep 17 00:00:00 2001 From: Henrik Stickann <4376396-Mithradir@users.noreply.gitlab.com> Date: Sun, 24 Apr 2022 14:50:55 +0200 Subject: [PATCH] Add fallthrough macro --- include/sta/lang.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sta/lang.hpp b/include/sta/lang.hpp index 00a797e..02b8046 100644 --- a/include/sta/lang.hpp +++ b/include/sta/lang.hpp @@ -43,7 +43,11 @@ */ #ifndef STA_UNREACHABLE # define STA_UNREACHABLE() __builtin_unreachable() -#endif // STA_UNREACHABLE +#endif // !STA_UNREACHABLE + +#ifndef STA_FALLTRHOUGH +# define STA_FALLTHROUGH() __attribute__((fallthrough)) +#endif // !STA_FALLTRHOUGH #endif // STA_LANG_HPP