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

Leif Lindholm leif.lindholm at linaro.org
Wed Sep 25 00:17:50 UTC 2019


On Tue, Sep 24, 2019 at 11:05:19PM +0800, 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
>  
> +

Please delete this spurious added blank line.
With that:
Reviewed-by: Leif Lindholm <leif.lindholm at linaro.org>

>  //
>  // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
>  // Section 2.3.1 of the UEFI 2.3 Specification.
> -- 
> 2.13.0.windows.1
> 
> 
> 
> 

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

View/Reply Online (#47999): https://edk2.groups.io/g/devel/message/47999
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