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 <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel 2025-01-17 12:58:42 +01:00 committed by mergify[bot]
parent f0c87b9ef4
commit ea2f6c68ee

View File

@ -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
//