[edk2-devel] [PATCH v3 0/1] MdePkg: Add STATIC_ASSERT macro

Vitaly Cheptsov via Groups.Io vit9696=protonmail.com at groups.io
Fri Aug 16 23:28:12 UTC 2019


Implements https://bugzilla.tianocore.org/show_bug.cgi?id=3D2048.

Things to note:
- _Static_assert is a standard C11 keyword and thus is available
on every modern compiler (including Apple Clang, Clang, and GCC).
See: https://en.cppreference.com/w/c/keyword/_Static_assert
- static_assert is a hack to support MSVC, which implements static
assertions with this vendor-specific keyword starting from at least
VS 2010 to date.
- V3 of the patch addresses the confusion with doxygen, which I
expected to not be able to handle @param for a macro with no arguments.
- The replacement of VERIFY_SIZE_OF will be submitted in a separate
patch series, and I request the colleagues to test this on their setups.
As for myself I can report that it works for me with CLANG38, GCC5,
VS2017, and XCODE5. 


Vitaly Cheptsov (1):
  MdePkg: Add STATIC_ASSERT macro

 MdePkg/Include/Base.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

-- 
2.20.1 (Apple Git-117)


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

View/Reply Online (#45867): https://edk2.groups.io/g/devel/message/45867
Mute This Topic: https://groups.io/mt/32917747/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20190816/506d3037/attachment.sig>


More information about the edk2-devel-archive mailing list