From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: michael.d.kinney@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Thu, 15 Aug 2019 09:15:22 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 09:08:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,389,1559545200"; d="scan'208";a="328415227" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga004.jf.intel.com with ESMTP; 15 Aug 2019 09:08:06 -0700 Received: from orsmsx126.amr.corp.intel.com (10.22.240.126) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 09:08:06 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.177]) by ORSMSX126.amr.corp.intel.com ([169.254.4.77]) with mapi id 14.03.0439.000; Thu, 15 Aug 2019 09:08:06 -0700 From: "Michael D Kinney" To: "devel@edk2.groups.io" , "vit9696@protonmail.com" , "Kinney, Michael D" , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro Thread-Topic: [edk2-devel] [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro Thread-Index: AQHVUbKarQboXB8rYEaaNG3pkStHNqb8Y77Q Date: Thu, 15 Aug 2019 16:08:05 +0000 Message-ID: References: <20190813081644.53963-1-vit9696@protonmail.com> <20190813081644.53963-2-vit9696@protonmail.com> In-Reply-To: <20190813081644.53963-2-vit9696@protonmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Return-Path: michael.d.kinney@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael D Kinney Mike > -----Original Message----- > From: devel@edk2.groups.io > [mailto:devel@edk2.groups.io] On Behalf Of vit9696 via > Groups.Io > Sent: Tuesday, August 13, 2019 1:17 AM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH v2 1/1] MdePkg: Add > STATIC_ASSERT macro >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2048 >=20 > Provide a macro for compile time assertions. > Equivalent to C11 static_assert macro from assert.h. >=20 > Signed-off-by: Vitaly Cheptsov > --- > MdePkg/Include/Base.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/MdePkg/Include/Base.h > b/MdePkg/Include/Base.h index > ce20b5f01dce..f85f7028a262 100644 > --- a/MdePkg/Include/Base.h > +++ b/MdePkg/Include/Base.h > @@ -843,6 +843,17 @@ typedef UINTN *BASE_LIST; > #define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)- > >Field)) #endif >=20 > +/// > +/// Portable definition for compile time assertions. > +/// Equivalent to C11 static_assert macro from > assert.h. > +/// Takes condtion and error message as its arguments. > +/// > +#ifdef _MSC_EXTENSIONS > + #define STATIC_ASSERT static_assert > +#else > + #define STATIC_ASSERT _Static_assert > +#endif > + > /** > Macro that returns a pointer to the data structure > that contains a specified field of > that data structure. This is a lightweight method > to hide information by placing a > -- > 2.20.1 (Apple Git-117) >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this > group. >=20 > View/Reply Online (#45503): > https://edk2.groups.io/g/devel/message/45503 > Mute This Topic: https://groups.io/mt/32850582/1643496 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [michael.d.kinney@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D