Ronald Oussoren added the comment: I just confirmed that clang only uses the LSB for _Bool values by looking at the assembly generated for the following code:
<quote> #include <stdbool.h> #include <stdio.h> int main(void) { _Bool x; *(unsigned char*)&x = 42; printf("%d\n", (int)x); return 0; } </quote> The attached patch fixes the issue for me. The new testcase fails without the changes to _struct.c and passes with those changes. ---------- Added file: http://bugs.python.org/file36010/issue-22012.txt _______________________________________ 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