[PATCH] AIX Fix xlc designated initializer bug

Michael Adam obnox at samba.org
Tue Mar 1 15:45:07 UTC 2016

On 2016-03-01 at 14:46 +0000, Guillaume G Taillon wrote:
> It took me a while to figure out what was going on... You can take a look 
> at the snippet I sent to the compiler team (they confirmed to me that they 
> were able to reproduce the problem). Judging from the error, xlc seems to 
> try to assign the member (.data which is uint64_t -> unsigned long long) 
> of the struct instead of the struct itself.

Uh. That sounds like a compiler bug, doesn't it?
But generally, the resulting binaries do work, right? :-)

> Assigning more members looks good but what about the .handle ones? They 
> don't have any siblings to be grouped with.

Right... At first sight I only looked at the .context.pid
example. :-)

We could go with the patch.
But I'd like to understand better why we need it. ;-)
And afaik, these struct initializers may have a subtle side
effect of initializing all other struct members to 0 values.
Probably not an issue, but I thought I'd mention it.

Opinions of other developers?
Should we just take Guillaume's patch and not ask any further?

Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160301/870c1a7e/signature.sig>

More information about the samba-technical mailing list