fix compiler warnings

This commit is contained in:
2026-02-20 12:44:18 -06:00
parent 54e5be0773
commit c0aff9e9bf
13 changed files with 33 additions and 24 deletions

View File

@@ -947,6 +947,11 @@ vm_dispatch:
#ifdef __GNUC__
/* Computed goto dispatch — each opcode gets its own branch predictor entry */
/* Use a macro to generate consistent dispatch table entries and labels */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverride-init"
#ifdef __clang__
#pragma clang diagnostic ignored "-Winitializer-overrides"
#endif
#define DT(x) [x] = &&op_##x
static const void *dispatch_table[256] = {
[0 ... 255] = &&op_DEFAULT,
@@ -1017,6 +1022,7 @@ vm_dispatch:
DT(MACH_IS_RECORD), DT(MACH_IS_STONE),
DT(MACH_LENGTH), DT(MACH_IS_PROXY),
};
#pragma GCC diagnostic pop
#undef DT
#define VM_DECODE() do { \
ctx->reg_current_frame = frame_ref.val; \