Message223501
> On 19 jul. 2014, at 23:22, Mark Dickinson <report@bugs.python.org> wrote:
>
>
> Mark Dickinson added the comment:
>
> The relevant piece of code in the struct module looks like this:
>
> static PyObject *
> nu_bool(const char *p, const formatdef *f)
> {
> BOOL_TYPE x;
> memcpy((char *)&x, p, sizeof x);
> return PyBool_FromLong(x != 0);
> }
>
> Is it possible that BOOL_TYPE is a bitfield of length 1, and that clang is somehow making use of that fact?
I haven't found a definitive source yet, but it seems that the only valid values for _Bool, which BOOL_TYPE expands to, are 0 and 1. Clang might make use of that restriction.
Ronald |
|
Date |
User |
Action |
Args |
2014-07-20 07:06:21 | ronaldoussoren | set | recipients:
+ ronaldoussoren, mark.dickinson, ned.deily, wayedt |
2014-07-20 07:06:21 | ronaldoussoren | link | issue22012 messages |
2014-07-20 07:06:21 | ronaldoussoren | create | |
|