<div dir="ltr">I don't think the existing binary problem CAN be solved - unless the code calls some function to enquire about the alignment, and then uses that. That of course assumes first and foremost that there is a suitable API to provide this information in the first place. <br><br>But having a constant that "if you just recompile, it will be fine" is a better solution than "you have to change your constant that you invented for your code to n, then recompile". And it gets more interesting when architecture A needs alignment of 8, architecture B needs 4, and architecture C needs alignment of 16. For portable code, this is quite a lot of work - unless you assume "largest of the different values", but using 16 can be quite a lot of overhead with many small allocations (linked lists and trees with small members, for example). <div><br></div><div>--</div><div>Mats<br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 December 2014 at 19:18, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Dec 13, 2014 at 06:43:03PM +0000, mats petersson wrote:<br>
> If the alignment, then surely "SuitableAlignment" should also change? It<br>
> "SuitableAlignment" isn't the right thing to use for "largest alignment",<br>
> then perhaps a new member is needed, but I thought that "SuitableAlignment"<br>
> was for "The alignment you need to ensure that data is aligned correctly.<br>
<br>
</span>But such change doesn't help *existing* binaries. We've had such fun in<br>
NetBSD with the Unix Domain Socket control message interface before,<br>
encoding "maximum alignment" implicitly in the ABI is not fun. That's<br>
why I am asking what the future compatibility promises around this<br>
interface are.<br>
<div class="HOEnZb"><div class="h5"><br>
Joerg<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div>