[PING] [PATCH] [gdb/build] Fix Wlto-type-mismatch in opcodes/ft32-dis.c

Tom de Vries tdevries@suse.de
Wed Aug 2 19:23:29 GMT 2023


> 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



More information about the Binutils mailing list