* [Patch] MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE
@ 2016-11-16 6:07 Liming Gao
2016-11-16 16:46 ` Kinney, Michael D
0 siblings, 1 reply; 3+ messages in thread
From: Liming Gao @ 2016-11-16 6:07 UTC (permalink / raw)
To: edk2-devel; +Cc: Michael Kinney
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
MdePkg/Include/Base.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 5e24b5d..c758cf3 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -63,6 +63,11 @@ VERIFY_SIZE_OF (UINT64, 8);
VERIFY_SIZE_OF (CHAR8, 1);
VERIFY_SIZE_OF (CHAR16, 2);
+//
+// Those three enum types are only used to verify compiler config is right.
+// They are not used by any source code. So, __ prefix is added for them to
+// avoid their name conflict with other types.
+//
typedef enum {
__VerifyUint8EnumValue = 0xff
} __VERIFY_UINT8_ENUM_SIZE;
--
2.8.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE
2016-11-16 6:07 [Patch] MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE Liming Gao
@ 2016-11-16 16:46 ` Kinney, Michael D
2016-11-17 0:55 ` Gao, Liming
0 siblings, 1 reply; 3+ messages in thread
From: Kinney, Michael D @ 2016-11-16 16:46 UTC (permalink / raw)
To: Gao, Liming, edk2-devel@lists.01.org, Kinney, Michael D
Liming,
Here is a wording update that also references the part of the
UEFI Spec that defines the enum type requirements.
//
// 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.
//
Mike
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
> Sent: Tuesday, November 15, 2016 10:08 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: [edk2] [Patch] MdePkg Base.h: Add add comments on __ prefix in enum
> VERIFY_UINTXX_ENUM_SIZE
>
> Cc: Michael Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
> MdePkg/Include/Base.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
> index 5e24b5d..c758cf3 100644
> --- a/MdePkg/Include/Base.h
> +++ b/MdePkg/Include/Base.h
> @@ -63,6 +63,11 @@ VERIFY_SIZE_OF (UINT64, 8);
> VERIFY_SIZE_OF (CHAR8, 1);
> VERIFY_SIZE_OF (CHAR16, 2);
>
> +//
> +// Those three enum types are only used to verify compiler config is right.
> +// They are not used by any source code. So, __ prefix is added for them to
> +// avoid their name conflict with other types.
> +//> typedef enum {
> __VerifyUint8EnumValue = 0xff
> } __VERIFY_UINT8_ENUM_SIZE;
> --
> 2.8.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE
2016-11-16 16:46 ` Kinney, Michael D
@ 2016-11-17 0:55 ` Gao, Liming
0 siblings, 0 replies; 3+ messages in thread
From: Gao, Liming @ 2016-11-17 0:55 UTC (permalink / raw)
To: Kinney, Michael D, edk2-devel@lists.01.org
Got you. I will update comments and push this change.
From: Kinney, Michael D
Sent: Thursday, November 17, 2016 12:47 AM
To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [edk2] [Patch] MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE
Liming,
Here is a wording update that also references the part of the
UEFI Spec that defines the enum type requirements.
//
// 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.
//
Mike
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
> Sent: Tuesday, November 15, 2016 10:08 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Cc: Kinney, Michael D
> Subject: [edk2] [Patch] MdePkg Base.h: Add add comments on __ prefix in enum
> VERIFY_UINTXX_ENUM_SIZE
>
> Cc: Michael Kinney
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao
> ---
> MdePkg/Include/Base.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
> index 5e24b5d..c758cf3 100644
> --- a/MdePkg/Include/Base.h
> +++ b/MdePkg/Include/Base.h
> @@ -63,6 +63,11 @@ VERIFY_SIZE_OF (UINT64, 8);
> VERIFY_SIZE_OF (CHAR8, 1);
> VERIFY_SIZE_OF (CHAR16, 2);
>
> +//
> +// Those three enum types are only used to verify compiler config is right.
> +// They are not used by any source code. So, __ prefix is added for them to
> +// avoid their name conflict with other types.
> +//> typedef enum {
> __VerifyUint8EnumValue = 0xff
> } __VERIFY_UINT8_ENUM_SIZE;
> --
> 2.8.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-17 0:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 6:07 [Patch] MdePkg Base.h: Add add comments on __ prefix in enum VERIFY_UINTXX_ENUM_SIZE Liming Gao
2016-11-16 16:46 ` Kinney, Michael D
2016-11-17 0:55 ` Gao, Liming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox