From: "gaoliming" <gaoliming@byosoft.com.cn>
To: <devel@edk2.groups.io>, <pen-chunx.lu@intel.com>,
"'Pedro Falcato'" <pedro.falcato@gmail.com>
Subject: 回复: [edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11
Date: Thu, 4 May 2023 14:58:46 +0800 [thread overview]
Message-ID: <030e01d97e55$df79ed50$9e6dc7f0$@byosoft.com.cn> (raw)
In-Reply-To: <5976.1682661213578501091@groups.io>
[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]
Joe:
Can you clarify your usage about GLOBAL_REMOVE_IF_UNREFERENCED? With this change, the warning of unused variable will not be reported if the unused variable with this attribute. Is it right?
Thanks
Liming
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 JoeX Lu
发送时间: 2023年4月28日 13:54
收件人: Pedro Falcato <pedro.falcato@gmail.com>; devel@edk2.groups.io
主题: Re: [edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11
Hi Pedro,
Thanks for your comment.
I hope this attribute can silent Wunused in GCC build.
Because it will be nice to declaim GLOBAL_REMOVE_IF_UNREFERENCED before unusd variable than #ifdef
example1:
#ifdef (UNUSED_CONDITION)
static Boolean samplvariable; // which will be triggered the Wunused warning message in GCC
#endif
example2:
GLOBAL_REMOVE_IF_UNREFERENCED static Boolean samplvariable; // which will be triggered the Wunused warning message in GCC
I think example2 will be better than example1.
Best Regards,
Joe Lu
[-- Attachment #2: Type: text/html, Size: 5481 bytes --]
next prev parent reply other threads:[~2023-05-04 6:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-05-05 0:04 ` [edk2-devel] 回复: " JoeX Lu
2023-05-05 3:15 ` 回复: " gaoliming
2023-05-05 4:47 ` [edk2-devel] " JoeX Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='030e01d97e55$df79ed50$9e6dc7f0$@byosoft.com.cn' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox