]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h
For ECP, disable ICC's remark #869: "Parameter" was never referenced warning.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Include / Ia32 / EfiBind.h
index 12d40de737a25157bb7252eb08288662f8b17928..c89ca9d00eaae045e030f741a8d70cabe0bb13b1 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -85,6 +85,44 @@ Abstract:
 //\r
 #pragma pack()\r
 \r
+#if __INTEL_COMPILER\r
+//\r
+// Disable ICC's warning: trailing comma is nonstandard\r
+//\r
+//#pragma warning ( disable : 271 )\r
+\r
+//\r
+// Disable ICC's warning: extra ";" ignored\r
+//\r
+#pragma warning ( disable : 424 )\r
+\r
+//\r
+// Disable ICC's warning: : variable "foo" was set but never used\r
+//\r
+#pragma warning ( disable : 593 )\r
+\r
+//\r
+// Disable ICC's remark #1418: external function definition with no prior declaration.\r
+// This is legal ANSI C code so we disable the remark that is turned on with /W4\r
+//\r
+#pragma warning ( disable : 1418 )\r
+\r
+\r
+//\r
+// Disable ICC's remark #1419: external declaration in primary source file\r
+// This is legal ANSI C code so we disable the remark that is turned on with /W4\r
+//\r
+#pragma warning ( disable : 1419 )\r
+\r
+//\r
+// Disable ICC's remark #869: "Parameter" was never referenced warning.\r
+// This is legal ANSI C code so we disable the remark that is turned on with -Wall\r
+//\r
+#pragma warning ( disable : 869 )\r
+\r
+#endif\r
+\r
+\r
 #if _MSC_EXTENSIONS\r
 \r
 //\r
@@ -133,7 +171,7 @@ Abstract:
 #endif\r
 \r
 \r
-#if (__STDC_VERSION__ < 199901L)\r
+#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)\r
   //\r
   // No ANSI C 2000 stdint.h integer width declarations, so define equivalents\r
   //\r
@@ -203,7 +241,12 @@ typedef int32_t   intn_t;
 // compiler will optimize away the rest of the function following, so that you run out in\r
 // the weeds if you skip over it with a debugger.\r
 //\r
+#ifdef _MSC_EXTENSIONS\r
 #define EFI_BREAKPOINT()  __asm { int 3 }\r
+#elif __GNUC__\r
+#define EFI_BREAKPOINT() asm("   int $3");\r
+#endif\r
+\r
 #define EFI_DEADLOOP()    { volatile UINTN __iii; __iii = 1; while (__iii); }\r
 \r
 //\r
@@ -263,7 +306,16 @@ typedef int32_t   intn_t;
 \r
 #endif\r
 \r
-\r
+//\r
+// For symbol name in GNU assembly code, an extra "_" is necessary\r
+//\r
+#if __GNUC__\r
+  #if defined(linux)\r
+    #define ASM_PFX(name) name\r
+  #else\r
+    #define ASM_PFX(name) _##name\r
+  #endif \r
+#endif\r
 \r
 #endif\r
 \r