public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11
@ 2023-04-28  2:46 JoeX Lu
  2023-04-28  4:46 ` [edk2-devel] " Pedro Falcato
  0 siblings, 1 reply; 7+ messages in thread
From: JoeX Lu @ 2023-04-28  2:46 UTC (permalink / raw)
  To: devel; +Cc: JoeX Lu, Michael D Kinney, Liming Gao, Zhiguang Liu

CC: Michael D Kinney <michael.d.kinney@intel.com>
CC: Liming Gao <gaoliming@byosoft.com.cn>
CC: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: JoeX Lu <pen-chunx.lu@intel.com>
---
 MdePkg/Include/Base.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 6597e441a6..951fce43ee 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -45,8 +45,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 ///  to it after all compiler and linker optimizations have been performed.
 ///
 ///
+#if defined (__GNUC__)
+#define GLOBAL_REMOVE_IF_UNREFERENCED __attribute__((unused))
+#else
 #define GLOBAL_REMOVE_IF_UNREFERENCED
 #endif
+#endif
 
 //
 // Should be used in combination with NORETURN to avoid 'noreturn' returns
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-05  4:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28  2:46 [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11 JoeX Lu
2023-04-28  4:46 ` [edk2-devel] " Pedro Falcato
2023-04-28  5:53   ` JoeX Lu
2023-05-04  6:58     ` 回复: " gaoliming
2023-05-05  0:04       ` [edk2-devel] " JoeX Lu
2023-05-05  3:15         ` 回复: " gaoliming
2023-05-05  4:47           ` [edk2-devel] " JoeX Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox