This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ToT glibc build problem with ToT GCC


On Fri, 30 Aug 2019, Martin Sebor wrote:

> Just as a heads up, there have been questions in WG14 about flexible
> array members in recent years.  Some of them were raised by people
> working on compilers who didn't have the same understanding of
> the requirements, and as a result, whose compilers behaved
> differently.  Since this is a bit of a murky area for some it's
> possible that some of these union/flexarray/zero-length array
> tricks might tickle their bugs.

Causing trouble for compilers with a different understanding seems rather 
more relevant for glibc's installed headers, or code shared with gnulib 
that might thus be compiled with lots of different compilers, than for 
code in glibc itself (or glibc's installed programs, in this case).

Using an initializer for a flexible array member is a GNU extension, not 
part of ISO C.  (It *is* an extension that's been known to have GCC bugs 
in the past, because it means objects with an initializer whose size is 
larger than the size of their type and that can cause confusion in the 
compiler.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]