From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, liming.gao@intel.com
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch
Date: Tue, 24 Sep 2019 17:45:31 +0200 [thread overview]
Message-ID: <2a1109f6-737d-2189-783c-db1fd45d2d84@redhat.com> (raw)
In-Reply-To: <20190924150519.10304-1-liming.gao@intel.com>
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@intel.com>
> Signed-off-by: Liming Gao <liming.gao@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@redhat.com>
next prev parent reply other threads:[~2019-09-24 15:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 15:05 [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch Liming Gao
2019-09-24 15:45 ` Philippe Mathieu-Daudé [this message]
2019-09-25 0:17 ` [edk2-devel] " Leif Lindholm
2019-09-25 0:37 ` Liming Gao
2019-09-25 4:40 ` Michael D Kinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a1109f6-737d-2189-783c-db1fd45d2d84@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox