From ea2f6c68ee92677787604cf0a9f412edbc2e599f Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Fri, 17 Jan 2025 12:58:42 +0100 Subject: MdePkg/Base: Don't error out on missing compiler CPP macros STATIC_ASSERT is #define'd to a compiler specific value, based on built-in macros exposed by those compilers. If none of those are found, an #error is raised. This breaks the DTCPP build rule, which relies on the C preprocessor for header file inclusion and value substitution, but doesn't define any of the compiler macros we look for. So drop the error case. If STATIC_ASSERT is used without a definition, an error will be raised anyway. Signed-off-by: Ard Biesheuvel --- MdePkg/Include/Base.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index a6fb59205e..ee5940a2d1 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -806,8 +806,6 @@ typedef UINTN *BASE_LIST; #define STATIC_ASSERT _Static_assert #elif defined (_MSC_EXTENSIONS) #define STATIC_ASSERT static_assert -#else - #error STATIC_ASSERT() definiton not available #endif // -- cgit