From a3596a040bbd363b75a4d79da359374c0f409bc5 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Tue, 24 Sep 2019 23:04:33 +0800 Subject: [PATCH] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch EBC compiler doesn't support C11 static_assert macro. So, define STATIC_ASSERT as empty to pass EBC arch build. STATIC_ASSERT macro is introduced @204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0 Cc: Michael D Kinney Signed-off-by: Liming Gao Reviewed-by: Leif Lindholm Reviewed-by: Philippe Mathieu-Daude Reviewed-by: Michael D Kinney --- MdePkg/Include/Base.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index ed85b98318..d94b8a5f93 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -799,7 +799,9 @@ typedef UINTN *BASE_LIST; @param Message Raised compiler diagnostic message when expression is false. **/ -#ifdef _MSC_EXTENSIONS +#ifdef MDE_CPU_EBC + #define STATIC_ASSERT(Expression, Message) +#elif _MSC_EXTENSIONS #define STATIC_ASSERT static_assert #else #define STATIC_ASSERT _Static_assert