-Wchar-subscripts warnings in target/i386/tcg/decode-new.c.inc
Using:
C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
We get:
[3881/5358] Compiling C object libqemu-i386-softmmu.fa.p/target_i386_tcg_translate.c.o
In file included from /home/f4bug/qemu/include/qemu/osdep.h:109,
from target/i386/tcg/translate.c:19:
target/i386/tcg/emit.c.inc: In function 'compute_mmx_offset':
target/i386/tcg/emit.c.inc:153:53: warning: array subscript has type 'char' [-Wchar-subscripts]
153 | op->offset = offsetof(CPUX86State, fpregs[op->n].mmx) + mmx_offset(op->ot);
| ~~^~~
target/i386/tcg/emit.c.inc: In function 'compute_xmm_offset':
target/i386/tcg/emit.c.inc:162:35: warning: array subscript has type 'char' [-Wchar-subscripts]
162 | op->offset = ZMM_OFFSET(op->n) + xmm_offset(op->ot);
| ~~^~~
target/i386/tcg/emit.c.inc:162:22: note: in expansion of macro 'ZMM_OFFSET'
162 | op->offset = ZMM_OFFSET(op->n) + xmm_offset(op->ot);
| ^~~~~~~~~~
target/i386/tcg/emit.c.inc: In function 'gen_load':
target/i386/tcg/emit.c.inc:225:54: warning: array subscript has type 'char' [-Wchar-subscripts]
225 | offsetof(CPUX86State,segs[op->n].selector));
| ~~^~~
target/i386/tcg/emit.c.inc:228:62: warning: array subscript has type 'char' [-Wchar-subscripts]
228 | tcg_gen_ld_tl(v, tcg_env, offsetof(CPUX86State, cr[op->n]));
| ~~^~~
target/i386/tcg/emit.c.inc:231:62: warning: array subscript has type 'char' [-Wchar-subscripts]
231 | tcg_gen_ld_tl(v, tcg_env, offsetof(CPUX86State, dr[op->n]));
| ~~^~~
In file included from target/i386/tcg/translate.c:2982:
target/i386/tcg/emit.c.inc:252:46: warning: array subscript has type 'char' [-Wchar-subscripts]
252 | tcg_gen_ext_tl(v, cpu_regs[op->n], op->ot | MO_SIGN);
| ~~^~~
target/i386/tcg/emit.c.inc:254:46: warning: array subscript has type 'char' [-Wchar-subscripts]
254 | tcg_gen_ext_tl(v, cpu_regs[op->n], op->ot);
| ~~^~~
target/i386/tcg/emit.c.inc:258:42: warning: array subscript has type 'char' [-Wchar-subscripts]
258 | tcg_gen_mov_tl(v, cpu_regs[op->n]);
| ~~^~~
target/i386/tcg/emit.c.inc: In function 'gen_writeback':
target/i386/tcg/emit.c.inc:322:67: warning: array subscript has type 'char' [-Wchar-subscripts]
322 | offsetof(CPUX86State, xmm_regs[op->n].ZMM_X(1)),
| ~~^~~
target/i386/tcg/emit.c.inc: In function 'gen_CMPccXADD':
target/i386/tcg/emit.c.inc:1236:48: warning: array subscript has type 'char' [-Wchar-subscripts]
1236 | tcg_gen_ext_tl(cmpv, cpu_regs[decode->op[1].n], ot_full);
| ~~~~~~~~~~~~~^~
In file included from target/i386/tcg/translate.c:2983:
target/i386/tcg/decode-new.c.inc: In function 'disas_insn_new':
target/i386/tcg/decode-new.c.inc:2004:36: warning: array subscript has type 'char' [-Wchar-subscripts]
2004 | cc_live = cc_op_live[decode.cc_op];
| ~~~~~~^~~~~~
Due to:
typedef struct X86DecodedOp {
int8_t n;
MemOp ot; /* For b/c/d/p/s/q/v/w/y/z */
X86OpUnit unit;
bool has_ea;
int offset; /* For MMX and SSE */
/*
* This field is used internally by macros OP0_PTR/OP1_PTR/OP2_PTR,
* do not access directly!
*/
TCGv_ptr v_ptr;
} X86DecodedOp;
struct X86DecodedInsn {
X86OpEntry e;
X86DecodedOp op[3];
target_ulong immediate;
AddressParts mem;
TCGv cc_dst, cc_src, cc_src2;
TCGv_i32 cc_op_dynamic;
int8_t cc_op;
uint8_t b;
};