struct A {
char[1] b;
}
void main()
{
A c;
if (*c.b.ptr)
return;
return;
}
The following of type char
====
*c.b.ptr
====
Generates and sends to the backend as type char[1]
====
c.b
====
This is wrong and invalid (non-scalar types cannot be used as boolean types).
Regards
Iain.
Comment #1 by ibuclaw — 2012-10-30T08:17:21Z
This conversion occurs in PtrExp::optimize.
*&c.b -> c.b
For static array types, would there be a problem doing this instead?
*&c.b -> c.b[0]