From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx.groups.io with SMTP id smtpd.web10.2353.1675991646311777228 for ; Thu, 09 Feb 2023 17:14:06 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm2 header.b=Ii6bnwTG; spf=pass (domain: bsdio.com, ip: 66.111.4.25, mailfrom: rebecca@bsdio.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 80AEA5C010A; Thu, 9 Feb 2023 20:14:05 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 09 Feb 2023 20:14:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1675991645; x= 1676078045; bh=NuI83JI7snbgyxqeOeYe23y97pN0nM69WvXkWu1WVVs=; b=I i6bnwTGb/Gjm3aUp8CQchRYE+R9xObV8n+YqHTae8SUsmUYyaA7swlhOnzujtD0t Icy9dXpjJUt2PT3bla/CKfNqOUhGJYqrYa46TbTmh6+mm3A0YT1S7GIOpBg803lU ZtxuuL6ZgIcCFFSK16UcvVFqVEqRgYULfsxvzs5hdqp5NJWncD7rE8zPNEO7aINx qGBwa2/3tFlGc6h/1x1FXsGDJEFaqx2ry/JQ9rQjCSWWZWVNHDL+aGVyEbail75h akAIPwDQOsPGP9daIxCK8X36oGlckNbVUSo8IaOoOKmIFamiJ5VcYG7LHHys/PAF XW7VXAwKpGR+KNvXE5rUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1675991645; x= 1676078045; bh=NuI83JI7snbgyxqeOeYe23y97pN0nM69WvXkWu1WVVs=; b=V ny17CHvbmgShUorIp+lWqEAjH3wbPa3git8LuYbyoq43CFIkIzNjl4M16d/QLkCZ ylUHsv6hPx2PD4dYf2FpqI4LajbMLDrWAGzItsZwD5rBI0NyfGimb19Nr/TnlFHX v2EFlhsnsU/FGKRqCNwEID7P2SieT7HH/Bk+JRaNmgj2X4EOcmydRaVtkEO7kFYv BMBJN5tjW4Gl1uaS2jhqFzQ0I5UdFeOz8eWAQew4SXFzEMMAg0eOrchKt6hxoryJ WOJnNGcci/AsvRC2MN7uk75xtNcZNa+KNt8MG6APlFNf+st7ybgW0ph6TGyxaJBW +6EbZ/xOOYmI2L7kNxnjw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehgedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeegteelffelleettdeuleeuhfejheejhfefkeekjeelteehheefgeffleet gfeuveenucffohhmrghinhepghhrohhuphhsrdhiohenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvggsvggttggrsegsshguihhordgtohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Feb 2023 20:14:03 -0500 (EST) Message-ID: <830d1f69-c7fc-c51f-cc37-2d258a792b86@bsdio.com> Date: Thu, 9 Feb 2023 18:14:02 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [edk2-devel] [PATCH 1/2] MdePkg: Update Base.h to be compliant with C11 To: devel@edk2.groups.io, michael.d.kinney@intel.com, "quic_rcran@quicinc.com" , "Gao, Liming" , "Liu, Zhiguang" Cc: Rebecca Cran References: <20230209154507.81877-1-rebecca@quicinc.com> From: "Rebecca Cran" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Since it's just a cleanup I don't see any need for it to be in edk2-stable202303. -- Rebecca Cran On 2/9/23 18:03, Michael D Kinney wrote: > Hi Rebecca, > > Reviewed-by: Michael D Kinney > > Do you think this needs to be considered for edk2-stable202302? > > Thanks, > > Mike > >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Rebecca Cran >> Sent: Thursday, February 9, 2023 7:45 AM >> To: devel@edk2.groups.io; Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang >> >> Cc: Rebecca Cran >> Subject: [edk2-devel] [PATCH 1/2] MdePkg: Update Base.h to be compliant with C11 >> >> With the introduction of the use of _Static_assert, edk2 requires a C11 >> compatible compiler. Update Include/Base.h to be compliant with C11. >> >> As of C11, the maximum type of an enum is type `int`. Since the UEFI >> Specification 2.3.1 Errata C allows either `int` or `unsigned int`, fix >> the 32-bit enum check to use a signed int. >> >> Since the UEFI 2.3 Specification only allowed signed int, update the >> comment to reference 2.3.1 Errata C where the change was made to allow >> unsigned int. >> >> Signed-off-by: Rebecca Cran >> --- >> MdePkg/Include/Base.h | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h >> index d209e6de280a..e89c84962ab2 100644 >> --- a/MdePkg/Include/Base.h >> +++ b/MdePkg/Include/Base.h >> @@ -796,9 +796,9 @@ STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specif >> // >> // The following three enum types are used to verify that the compiler >> // configuration for enum types is compliant with Section 2.3.1 of the >> -// UEFI 2.3 Specification. These enum types and enum values are not >> -// intended to be used. A prefix of '__' is used avoid conflicts with >> -// other types. >> +// UEFI 2.3.1 Errata C Specification. These enum types and enum values >> +// are not intended to be used. A prefix of '__' is used avoid >> +// conflicts with other types. >> // >> typedef enum { >> __VerifyUint8EnumValue = 0xff >> @@ -809,12 +809,12 @@ typedef enum { >> } __VERIFY_UINT16_ENUM_SIZE; >> >> typedef enum { >> - __VerifyUint32EnumValue = 0xffffffff >> -} __VERIFY_UINT32_ENUM_SIZE; >> + __VerifyInt32EnumValue = 0x7fffffff >> +} __VERIFY_INT32_ENUM_SIZE; >> >> STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); >> STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); >> -STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); >> +STATIC_ASSERT (sizeof (__VERIFY_INT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); >> >> /** >> Macro that returns a pointer to the data structure that contains a specified field of >> -- >> 2.30.2 >> >> >> >> >> > > > > > >