[Bug c/107951] Invalid flexible array use not detected in nested structs by the C frontend

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 2 16:55:08 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107951

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to qinzhao from comment #6)
> after reading the history, my understanding is:
> 
>  this gcc extension is added as a workaround to build glibc since glibc
> source code has such usage of flexible array members;
> 
> my question is: why not changing the glibc source code instead? then we
> don't need such workaround in GCC?

Because after all those years, you don't really know if it is just glibc (which
likely doesn't do that anymore), but many other programs in the wild.


More information about the Gcc-bugs mailing list