On Wed, Jul 19, 2023 at 10:27 AM Adhemerval Zanella Netto < adhemerval.zanella@linaro.org> wrote: > > > On 19/07/23 09:40, Cristian Rodríguez via Libc-alpha wrote: > > On Mon, Jul 10, 2023 at 11:05 AM Cristian Rodríguez < > cristian@rodriguez.im> > > wrote: > > > >> Currently GCC 13 -fstrict-flex-arrays cannot be used safely with user > >> code because the library makes use of pre-c99 flexible arrays. > >> > >> This series introduces a macro to annotate such uses and grandfathers-in > >> this legacy use. > >> > >> This series only cover the user-visible *library* types. the linux > kernel > >> types > >> are subject to a different patch set and discussion since the kernel has > >> moved on to c11 leaving pre-c99 compatibilty behind. > >> > >> > >> > >> > > Any comments about this series.. ? as is it should introduce no > > regressions. > > > 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. if breaking the ABi is an option then one can switch completely to c99 flexible arrays and using/importing DECL_FLEX_ARRAY macro from the linux kernel and move on. I concluded it was better to grandfather them in and leave them as special cases is the less painful solution for user visible parts, internals can just use standard flex arrays.