public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v3 0/1] MdePkg: Add STATIC_ASSERT macro
@ 2019-08-16 23:28 Vitaly Cheptsov
  2019-08-16 23:28 ` [PATCH v3 1/1] " Vitaly Cheptsov
  0 siblings, 1 reply; 7+ messages in thread
From: Vitaly Cheptsov @ 2019-08-16 23:28 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

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)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-09-12  1:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-16 23:28 [PATCH v3 0/1] MdePkg: Add STATIC_ASSERT macro Vitaly Cheptsov
2019-08-16 23:28 ` [PATCH v3 1/1] " Vitaly Cheptsov
2019-09-07 16:31   ` [edk2-devel] " Vitaly Cheptsov
2019-09-09  7:57     ` Liming Gao
2019-09-09 23:04       ` Vitaly Cheptsov
2019-09-10  6:30   ` Philippe Mathieu-Daudé
2019-09-12  1:21     ` Liming Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox