Re: [edk2-devel] [PATCH] MdePkg: DebugLib: Compilation fix for clang-13.

2021-11-23 Thread Michael Brown
On 23/11/2021 06:41, Marvin Häuser wrote: 23.11.2021 00:17:30 Michael Brown : I would very strongly recommend having the non-debug version of the macro use something like: #define ASSERT(Expression) do {   \ if (FALSE) {  \    (VOID) (Expression);    \ }   

Re: [edk2-devel] [PATCH] MdePkg: DebugLib: Compilation fix for clang-13.

2021-11-22 Thread Marvin Häuser
23.11.2021 00:17:30 Michael Brown : > On 22/11/2021 16:42, Michael D Kinney wrote: >> You are also modifying the DebugLib in the paths where ASSERT() macros >> are disabled.  When they are disabled, we want all code/data associated >> with ASSERT() to be removed by the optimizing compiler/linker

Re: [edk2-devel] [PATCH] MdePkg: DebugLib: Compilation fix for clang-13.

2021-11-22 Thread Michael Brown
On 22/11/2021 16:42, Michael D Kinney wrote: You are also modifying the DebugLib in the paths where ASSERT() macros are disabled. When they are disabled, we want all code/data associated with ASSERT() to be removed by the optimizing compiler/linker. The source code change appears to force a ref

Re: [edk2-devel] [PATCH] MdePkg: DebugLib: Compilation fix for clang-13.

2021-11-22 Thread Michael D Kinney
Hi Mikhail, Are you able to provide a few examples of dead code this change uncovers? If there is additional issues then wouldn't applying this patch break all the open source package builds that contain these issues? Does this patch series pass EDK II CI? Wouldn't it also make sense to remove

Re: [edk2-devel] [PATCH] MdePkg: DebugLib: Compilation fix for clang-13.

2021-11-19 Thread Michael D Kinney
Hi Mikhail, For RELEASE GCC5 toolchains in tools_def.txt, I see this warning is disabled. Likely for the same reason. RELEASE_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Os -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC5_X64_CC_FLAGS= DEF(GCC5_X64_CC_