[edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch

Philippe Mathieu-Daudé philmd at redhat.com
Tue Sep 24 15:45:31 UTC 2019


On 9/24/19 5:05 PM, Liming Gao wrote:
> 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 <michael.d.kinney at intel.com>
> Signed-off-by: Liming Gao <liming.gao at intel.com>
> ---
>  MdePkg/Include/Base.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
> index ed85b98318..70e4d8daf1 100644
> --- a/MdePkg/Include/Base.h
> +++ b/MdePkg/Include/Base.h
> @@ -799,12 +799,15 @@ 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
>  #endif
>  
> +
>  //
>  // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
>  // Section 2.3.1 of the UEFI 2.3 Specification.
> 

Reviewed-by: Philippe Mathieu-Daude <philmd at redhat.com>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47966): https://edk2.groups.io/g/devel/message/47966
Mute This Topic: https://groups.io/mt/34277056/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list