Mark Dickinson <dicki...@gmail.com> added the comment:

Another snippet, from the latest public draft of the System V x86-64 ABI [1]:

"""Structures and unions assume the alignment of their most strictly aligned 
compo- nent. Each member is assigned to the lowest available offset with the 
appropriate alignment. The size of any object is always a multiple of the 
object‘s alignment."""

I'd be fine with using the largest alignment, as above, instead of computing an 
lcm;  I can't believe it'll ever make a difference in practice.  For an empty 
struct (not allowed in C99, but allowed as a gcc extension, and allowed by the 
struct module), the alignment would be 1, of course.

[1] http://www.x86-64.org/documentation/abi.pdf

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3132>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to