[PATCH] AIX Fix xlc designated initializer bug

Andrew Bartlett abartlet at samba.org
Tue Mar 1 20:50:21 UTC 2016


On Tue, 2016-03-01 at 16:45 +0100, Michael Adam wrote:
> 
> 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?
> ;-)

I take it by the wink that you don't think that is a good option.  I
realise that AIX is a special platform dear to many, but I'm also quite
hesitant to continue to be held back to old-unix compiler
idiosyncrasies. 

Can we just require a build with GCC/clang?  

Before we decide to fix this one, and so lock us in to supporting xlc
again, I just wonder if anybody knows what other features are
missing/buggy in xlc that we use, or might want to use soon?

That is, after many years of avoiding almost anything not in C89, we
recently managed to start using 'modern' features first introduced > 20
years ago.  It has made our code much better (C99 initialisers and
dynamic stack arrays in particular), and there may be other features we
would like to use, but wouldn't work with a restriction to what xlc
supports.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160302/1cc6ec85/signature.sig>


More information about the samba-technical mailing list