From a28c53cd38cab255b2beeaf5261e3614366bb671 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Sun, 23 Jun 2024 16:12:25 +0300 Subject: [PATCH] Mark indirect goto and address-as-label as extensions --- quickjs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickjs.c b/quickjs.c index b40f491..52abc9e 100644 --- a/quickjs.c +++ b/quickjs.c @@ -14584,13 +14584,13 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValue func_obj, #define DEFAULT default #define BREAK break #else - static const void * const dispatch_table[256] = { + __extension__ static const void * const dispatch_table[256] = { #define DEF(id, size, n_pop, n_push, f) && case_OP_ ## id, #define def(id, size, n_pop, n_push, f) #include "quickjs-opcode.h" [ OP_COUNT ... 255 ] = &&case_default }; -#define SWITCH(pc) DUMP_BYTECODE_OR_DONT(pc) goto *dispatch_table[opcode = *pc++]; +#define SWITCH(pc) DUMP_BYTECODE_OR_DONT(pc) __extension__ ({ goto *dispatch_table[opcode = *pc++]; }); #define CASE(op) case_ ## op #define DEFAULT case_default #define BREAK SWITCH(pc)