mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 09:04:07 +02:00
MdePkg/Include: Use _Static_assert for clang and GNUC
The clang compiler generates the following error error: use of 'static_assert' without inclusion of <assert.h> This is due to the use of the MSC Extension static_assert. Use _Static_assert instead for clang and GNUC compilers. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
parent
aae044a130
commit
8b2256fbf2
@ -800,12 +800,14 @@ typedef UINTN *BASE_LIST;
|
|||||||
@param Message Raised compiler diagnostic message when expression is false.
|
@param Message Raised compiler diagnostic message when expression is false.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
#ifdef MDE_CPU_EBC
|
#if defined (__cplusplus)
|
||||||
#define STATIC_ASSERT(Expression, Message)
|
#define STATIC_ASSERT static_assert
|
||||||
#elif defined (_MSC_EXTENSIONS) || defined (__cplusplus)
|
#elif defined (__GNUC__) || defined (__clang__)
|
||||||
|
#define STATIC_ASSERT _Static_assert
|
||||||
|
#elif defined (_MSC_EXTENSIONS)
|
||||||
#define STATIC_ASSERT static_assert
|
#define STATIC_ASSERT static_assert
|
||||||
#else
|
#else
|
||||||
#define STATIC_ASSERT _Static_assert
|
#error STATIC_ASSERT() definiton not available
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user