* [PATCH] gcn: Fix a warning
@ 2024-01-23 10:01 Jakub Jelinek
2024-01-23 10:12 ` Andrew Stubbs
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2024-01-23 10:01 UTC (permalink / raw)
To: Andrew Stubbs; +Cc: gcc-patches, Tobias Burnus
Hi!
I see
../../gcc/config/gcn/gcn.cc: In function ‘void gcn_hsa_declare_function_name(FILE*, const char*, tree)’:
../../gcc/config/gcn/gcn.cc:6568:67: warning: unused parameter ‘decl’ [-Wunused-parameter]
6568 | gcn_hsa_declare_function_name (FILE *file, const char *name, tree decl)
| ~~~~~^~~~
warning presumably since r14-6945-gc659dd8bfb55e02a1b97407c1c28f7a0e8f7f09b
Previously, the argument was anonymous, but now it is passed to a macro
which ignores it, so I think we should go with ATTRIBUTE_UNUSED.
Ok for trunk?
2024-01-23 Jakub Jelinek <jakub@redhat.com>
* config/gcn/gcn.cc (gcn_hsa_declare_function_name): Add
ATTRIBUTE_UNUSED to decl.
--- gcc/config/gcn/gcn.cc.jj 2024-01-08 16:13:18.625940507 +0100
+++ gcc/config/gcn/gcn.cc 2024-01-23 10:47:33.945954494 +0100
@@ -6565,7 +6565,8 @@ output_file_start (void)
comments that pass information to mkoffload. */
void
-gcn_hsa_declare_function_name (FILE *file, const char *name, tree decl)
+gcn_hsa_declare_function_name (FILE *file, const char *name,
+ tree decl ATTRIBUTE_UNUSED)
{
int sgpr, vgpr, avgpr;
bool xnack_enabled = TARGET_XNACK;
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] gcn: Fix a warning
2024-01-23 10:01 [PATCH] gcn: Fix a warning Jakub Jelinek
@ 2024-01-23 10:12 ` Andrew Stubbs
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Stubbs @ 2024-01-23 10:12 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches, Tobias Burnus
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
On Tue, 23 Jan 2024 at 10:01, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> I see
> ../../gcc/config/gcn/gcn.cc: In function ‘void
> gcn_hsa_declare_function_name(FILE*, const char*, tree)’:
> ../../gcc/config/gcn/gcn.cc:6568:67: warning: unused parameter ‘decl’
> [-Wunused-parameter]
> 6568 | gcn_hsa_declare_function_name (FILE *file, const char *name, tree
> decl)
> |
> ~~~~~^~~~
> warning presumably since r14-6945-gc659dd8bfb55e02a1b97407c1c28f7a0e8f7f09b
> Previously, the argument was anonymous, but now it is passed to a macro
> which ignores it, so I think we should go with ATTRIBUTE_UNUSED.
>
> Ok for trunk?
>
OK.
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-23 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23 10:01 [PATCH] gcn: Fix a warning Jakub Jelinek
2024-01-23 10:12 ` Andrew Stubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).