On 18 January 2016 at 19:50, Programmingkid <programmingk...@gmail.com> wrote:
> I tried what Peter Maydell did and here are the results:
>
> typedef __darwin_size_t size_t;
>
> char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct 
> cmsghdr)) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)) + 
> ((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(int) * 16) + 
> (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)))] = { 0 };
>
> It looks like the problem was actually with this part: = { 0 };

No, the problem is that the compiler seems to think the bit in []
is not compile time constant (the = { 0 } initializer syntax
is valid if and only if it is compile-time-constant).

Can you say what 'gcc --version' prints for you? That will
tell us the clang version number, which is more interesting
than what clang claims its gcc-compatibility is.

I'm leaning towards this being a compiler bug fixed in
a later version of clang, because that [] expression looks
like it should be constant to me, and it's constant as
far as my clang version thinks.

thanks
-- PMM

Reply via email to