Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

The output is: "3 2" on windows. It is "2 2" on the linux 64bit I tried.
This is consistent with what the usual compilers do on these platforms: MSVC on 
windows, and gcc on linux.

The specification of the C language specifies that """If an adjacent bitfield 
will not fit into the remainder of the unit, the implementation defines whether 
bitfields are allowed to span units or whether another unit is allocated for 
the second bitfield"""

Are you using gcc on windows? In this case I suggest to always use the largest 
type to declare the bitfields.

----------
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file21776/bitfields.c

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

Reply via email to