@@ -270,13 +270,13 @@ typedef union WASMValue {
270270typedef struct WASMStructNewInitValues {
271271 uint32 type_idx ;
272272 uint32 count ;
273- WASMValue fields [ 1 ] ;
273+ BH_FLEXIBLE_ARRAY_MEMBER ( WASMValue , fields ) ;
274274} WASMStructNewInitValues ;
275275
276276typedef struct WASMArrayNewInitValues {
277277 uint32 type_idx ;
278278 uint32 length ;
279- WASMValue elem_data [ 1 ] ;
279+ BH_FLEXIBLE_ARRAY_MEMBER ( WASMValue , elem_data ) ;
280280} WASMArrayNewInitValues ;
281281
282282typedef struct InitializerExpression {
@@ -444,7 +444,7 @@ typedef struct WASMFuncType {
444444 /* types of params and results, only store the first byte
445445 * of the type, if it cannot be described with one byte,
446446 * then the full type info is stored in ref_type_maps */
447- uint8 types [ 1 ] ;
447+ BH_FLEXIBLE_ARRAY_MEMBER ( uint8 , types ) ;
448448} WASMFuncType ;
449449
450450#if WASM_ENABLE_GC != 0
@@ -486,7 +486,7 @@ typedef struct WASMStructType {
486486 * the first byte of the field type, if it cannot be described
487487 * with one byte, then the full field type info is stored in
488488 * ref_type_maps */
489- WASMStructFieldType fields [ 1 ] ;
489+ BH_FLEXIBLE_ARRAY_MEMBER ( WASMStructFieldType , fields ) ;
490490} WASMStructType ;
491491
492492typedef struct WASMArrayType {
@@ -862,7 +862,7 @@ typedef struct BrTableCache {
862862 /* Address of br_table opcode */
863863 uint8 * br_table_op_addr ;
864864 uint32 br_count ;
865- uint32 br_depths [ 1 ] ;
865+ BH_FLEXIBLE_ARRAY_MEMBER ( uint32 , br_depths ) ;
866866} BrTableCache ;
867867
868868#if WASM_ENABLE_DEBUG_INTERP != 0
0 commit comments