Ronald Oussoren added the comment:

BTW. There is also an argument to be made against my patch and for a 
documentation update: it is unclear to me if clang ever creates _Bool false 
values where the bit pattern isn't exactly the same as the zero value of an 
integer of the same size (for example due to generated code only updating the 
least significant bit and starting with a uninitialised value that has some of 
the other bits set).  If it does so depends on what's more efficient to do in 
machine code, and my knowledge of assembly is too rusty to have anything useful 
to say about that (although I'd suspect that overwriting the complete _Bool 
value would be more efficient than loading the current value, updating the LSB 
and storing it again).

If it can do so the current behavior of struct.unpack would be more correct 
than the version you get after applying my patch.

----------

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

Reply via email to