public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PING] [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c
@ 2023-08-02 19:23 Tom de Vries
  2023-08-03  8:49 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2023-08-02 19:23 UTC (permalink / raw)
  To: binutils

> Somebody on irc mentioned the following warning.
> 
> When building gdb with -O2 -flto, we run into:
> ...
> opcodes/ft32-dis.c:30: warning: type of 'ft32_opc_info' does not match \
>   original declaration [-Wlto-type-mismatch]
>    30 | extern const ft32_opc_info_t ft32_opc_info[128];
>       |
> opcodes/ft32-opc.c:25: note: array types have different bounds
>    25 | const ft32_opc_info_t ft32_opc_info[] =
>       |
> opcodes/ft32-opc.c:25: note: 'ft32_opc_info' was previously declared here
> ...
> 
> Fix this by using ft32_opc_info[] in opcodes/ft32-dis.c.
> 

Ping.

Thanks,
- Tom

> Tested on x86_64-linux.
> ---
>  opcodes/ft32-dis.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/opcodes/ft32-dis.c b/opcodes/ft32-dis.c
> index 493297549bf..4c7cac5968d 100644
> --- a/opcodes/ft32-dis.c
> +++ b/opcodes/ft32-dis.c
> @@ -27,7 +27,7 @@
>  #include "opcode/ft32.h"
>  #include "disassemble.h"
>  
> -extern const ft32_opc_info_t ft32_opc_info[128];
> +extern const ft32_opc_info_t ft32_opc_info[];
>  
>  static fprintf_ftype fpr;
>  static void *stream;
> 
> base-commit: 8193fa9cbe1a6cdb2cb41cedb835de33a1c755e3
> -- 
> 2.35.3


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

* Re: [PING] [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c
  2023-08-02 19:23 [PING] [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c Tom de Vries
@ 2023-08-03  8:49 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2023-08-03  8:49 UTC (permalink / raw)
  To: Tom de Vries, binutils

Hi Tom ,

>> Fix this by using ft32_opc_info[] in opcodes/ft32-dis.c.

> Ping.

Oops - sorry.  Patch approved and applied.

Cheers
   Nick



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

end of thread, other threads:[~2023-08-03  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-02 19:23 [PING] [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c Tom de Vries
2023-08-03  8:49 ` Nick Clifton

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).