From f0ec28675919f7ef287ecc0404421d06541060fc Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Wed, 19 Aug 2020 09:13:39 -0700 Subject: [PATCH] toolchain: gcc: Add macro to fallthrough attribute This macro is intended to be used in intentional fallthroughs on switch / case statements. Signed-off-by: Flavio Ceolin --- include/toolchain/gcc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/toolchain/gcc.h b/include/toolchain/gcc.h index 65ebbc08900..73298225ff3 100644 --- a/include/toolchain/gcc.h +++ b/include/toolchain/gcc.h @@ -165,6 +165,9 @@ do { \ __attribute__((long_call, section(".ramfunc"))) #endif /* !CONFIG_XIP */ +#ifndef __fallthrough +#define __fallthrough __attribute__((fallthrough)) +#endif #ifndef __packed #define __packed __attribute__((__packed__)) #endif