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: [PATCH] nptl: Add workaround for ASSERT_PTHREAD_INTERNAL_SIZE with GCC 4.9



On 21/11/2017 11:10, Florian Weimer wrote:
> On 11/21/2017 01:20 PM, Adhemerval Zanella wrote:
>> -  _Static_assert (sizeof ((type) { 0 }).__size >= sizeof (internal),     \
>> +  _Static_assert (sizeof ((type) { { 0 } }).__size >= sizeof (internal),\
> 
> Doesn't GCC support an empty initializer as an extension?  Maybe you can use that.  Otherwise, the version above is fine as well.

My understanding from bug report is empty initializer is really
defined for C++.  Anyway the internal contents of the created
struct is not really important here, I think either would work
(I will stick with mine just because I already checked it works
on GCC from 4 to 7).


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