[PATCH 0/6] Support use of -fstrict-flex-arrays in user code
Paul Eggert
eggert@cs.ucla.edu
Fri Aug 11 22:10:12 GMT 2023
On 2023-07-19 07:57, Cristian Rodríguez via Libc-alpha wrote:
>> Can't we use the already define __flexarr/__glibc_c99_flexarr_available
>> macro
>> instead?
>
> If I did only that, sizeof public structures may change causing an abi
> break.
Why would it cause an ABI break?
For example, no program's machine code should depend on sizeof (FTSENT).
fts.h's FTSENT is supposed to be an incomplete data type, like FILE: the
system allocates FTSENT objects, not user code. So I don't see the harm
in replacing [1] with [] in the definition of FTSENT's fts_name member,
if the compiler supports flex arrays.
More information about the Libc-alpha
mailing list