]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Base.h
MdePkg/Include: Add enumeration size checks to Base.h
[mirror_edk2.git] / MdePkg / Include / Base.h
index 82a773ae744cb7c3767ce681d30c46fefa61921e..22170581a00f44f57e2affc27360f2f00d4210c5 100644 (file)
@@ -63,6 +63,22 @@ VERIFY_SIZE_OF (UINT64, 8);
 VERIFY_SIZE_OF (CHAR8, 1);\r
 VERIFY_SIZE_OF (CHAR16, 2);\r
 \r
+typedef enum {\r
+  __VerifyUint8EnumValue = 0xff\r
+} __VERIFY_UINT8_ENUM_SIZE;\r
+\r
+typedef enum {\r
+  __VerifyUint16EnumValue = 0xffff\r
+} __VERIFY_UINT16_ENUM_SIZE;\r
+\r
+typedef enum {\r
+  __VerifyUint32EnumValue = 0xffffffff\r
+} __VERIFY_UINT32_ENUM_SIZE;\r
+\r
+VERIFY_SIZE_OF (__VERIFY_UINT8_ENUM_SIZE, 4);\r
+VERIFY_SIZE_OF (__VERIFY_UINT16_ENUM_SIZE, 4);\r
+VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4);\r
+\r
 //\r
 // The Microsoft* C compiler can removed references to unreferenced data items\r
 //  if the /OPT:REF linker option is used. We defined a macro as this is a\r