From 97a0d61f0d1d5a9280ba72e2e50d87e4b853777f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 15 Mar 2021 14:41:56 +0100 Subject: [PATCH] compiler.h: Define a __fallthrough statement Change-Id: I0487698290992162fac6bb74b5082901415e917e Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/51497 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Tim Wawrzynczak --- src/commonlib/bsd/include/commonlib/bsd/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commonlib/bsd/include/commonlib/bsd/compiler.h b/src/commonlib/bsd/include/commonlib/bsd/compiler.h index 4dd09bc90c..ebf017900d 100644 --- a/src/commonlib/bsd/include/commonlib/bsd/compiler.h +++ b/src/commonlib/bsd/include/commonlib/bsd/compiler.h @@ -35,6 +35,10 @@ #define __always_inline inline __attribute__((always_inline)) #endif +#ifndef __fallthrough +#define __fallthrough __attribute__((__fallthrough__)) +#endif + /* This evaluates to the type of the first expression, unless that is constant in which case it evaluates to the type of the second. This is useful when assigning macro parameters to temporary variables, because that would