From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@protonmail.com header.s=default header.b=gak2Sl7G; spf=pass (domain: protonmail.com, ip: 185.70.40.22, mailfrom: vit9696@protonmail.com) Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by groups.io with SMTP; Fri, 16 Aug 2019 16:28:16 -0700 Date: Fri, 16 Aug 2019 23:28:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1565998093; bh=WKNEVkW5VMTWsywgcu/OFq7A78VDjwx2PSEb+agVczs=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=gak2Sl7GhRU9DkreuAESvLZ0+cq0jIhMXq9pemy6ICROVtIPsgiG1TetfhahNqeHI fBWrjAepD5dT4qmvmah5kVoWmMIvGIgZRJMvau0tofwb0gVKnWEpZRSZ9ebzHU2BTH CTerVUVaKR0C+yG/AooLaG8cBzcAOOpcMA87C5ik= To: devel@edk2.groups.io From: "Vitaly Cheptsov" Reply-To: Vitaly Cheptsov Subject: [PATCH v3 0/1] MdePkg: Add STATIC_ASSERT macro Message-ID: <20190816232811.14941-1-vit9696@protonmail.com> Feedback-ID: p9QuX-L1wMgUm6nrSvNrf8juLupNs0VSnzXGVXuYDxlEahFdWtaedWDMB9zpwGDklGt7kzs1-RBc0cqz327Gcg==:Ext:ProtonMail MIME-Version: 1.0 X-Spam-Status: No, score=-0.7 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch X-Groupsio-MsgNum: 45867 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="---------------------2fc4c7a40e301a990ace1ec33a787a14"; charset=UTF-8 -----------------------2fc4c7a40e301a990ace1ec33a787a14 Content-Transfer-Encoding: quoted-printable Date: Sat, 17 Aug 2019 02:28:10 +0300 From: Vitaly Cheptsov Message-Id: <20190816232811.14941-1-vit9696@protonmail.com> Mime-Version: 1.0 Subject: [PATCH v3 0/1] MdePkg: Add STATIC_ASSERT macro To: devel@edk2.groups.io X-Mailer: git-send-email 2.20.1 (Apple Git-117) Implements https://bugzilla.tianocore.org/show_bug.cgi?id=3D3D2048. 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.=20 Vitaly Cheptsov (1): MdePkg: Add STATIC_ASSERT macro MdePkg/Include/Base.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --=20 2.20.1 (Apple Git-117) -----------------------2fc4c7a40e301a990ace1ec33a787a14 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wsBmBAEBCAAQBQJdVzwMCRBPsoxt7Hy0xQAKCRBPsoxt7Hy0xfk/CAAQzpWl MZXd8q8SRJcZWwAgTMfru/J4Hoxp+JUy3etqEpkRHUDnCh//LTcIzm6+GM2B hHNVeteM9oTnucbV6wTrsUg5Ywwe2mVLyFpHwGLXZ5v5J0SSBSFb2KuSEAxJ oVgBYitCCxV8hOU4ahG8C6E6Opz9b0AVBZLc0/iagZgQa2x5urBlzXqGC6Ta oVvM5ojDXNDtGp82vefCimVgluMBXHvxzQDxCJrWFfJyFGjvQpu7XPodDLmg N7LcopO7HRuWmzua15C54NN4XM1idPYw++ppml2Md73GXA2yQCwmcPe7OAsw /ZarRiwOX4Gt1amM+VwLqkK6izX9oPp9+G8B =v87Y -----END PGP SIGNATURE----- -----------------------2fc4c7a40e301a990ace1ec33a787a14--