mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix build on Clang 18 (#14136)
Clang 18 only allows counted_by to work on real flexible array members, not ones with a zero size. Otherwise you get errors like: ``` ext/opcache/jit/zend_jit_ir.c:149:12: error: 'counted_by' only applies to C99 flexible array members ```
This commit is contained in:
parent
bf3c4870b6
commit
8aec95e23f
2 changed files with 2 additions and 2 deletions
|
@ -913,7 +913,7 @@ typedef struct _zend_ffi_callback_data {
|
|||
ffi_cif cif;
|
||||
uint32_t arg_count;
|
||||
ffi_type *ret_type;
|
||||
ffi_type *arg_types[0] ZEND_ELEMENT_COUNT(arg_count);
|
||||
ffi_type *arg_types[] ZEND_ELEMENT_COUNT(arg_count);
|
||||
} zend_ffi_callback_data;
|
||||
|
||||
static void zend_ffi_callback_hash_dtor(zval *zv) /* {{{ */
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
typedef struct _ir_refs {
|
||||
uint32_t count;
|
||||
uint32_t limit;
|
||||
ir_ref refs[0] ZEND_ELEMENT_COUNT(count);
|
||||
ir_ref refs[] ZEND_ELEMENT_COUNT(count);
|
||||
} ir_refs;
|
||||
|
||||
#define ir_refs_size(_n) (offsetof(ir_refs, refs) + sizeof(ir_ref) * (_n))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue