compiler.h: Define a __fallthrough statement

Change-Id: I0487698290992162fac6bb74b5082901415e917e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Arthur Heymans 2021-03-15 14:41:56 +01:00 committed by Felix Held
parent 33b7bb6ee5
commit 97a0d61f0d
1 changed files with 4 additions and 0 deletions

View File

@ -35,6 +35,10 @@
#define __always_inline inline __attribute__((always_inline)) #define __always_inline inline __attribute__((always_inline))
#endif #endif
#ifndef __fallthrough
#define __fallthrough __attribute__((__fallthrough__))
#endif
/* This evaluates to the type of the first expression, unless that is constant /* 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 in which case it evaluates to the type of the second. This is useful when
assigning macro parameters to temporary variables, because that would assigning macro parameters to temporary variables, because that would