On 06/04/2013 04:45 AM, Richard Biener wrote:
Yes. Booleans are integral types with a single bit of precision, right? So
this check should allow boolean types. What am I missing?
We have BOOLEAN_TYPEs that do not have a TYPE_PRECISION of one
(but still are two-valued, and we assume those values are 0 and != 0 (eh)).
So there is code that treats BOOLEAN_TYPEs the same as TYPE_PRECISION
one types and there is code that does not (for example bitwise not is not
equal to truth not on such types).
Good grief. For a boolean with a TYPE_PRECISION != 1, I think we can
apply the transformations if the type is unsigned. Once the type is
signed I think we'd lose.
Do you have any sample code which would create a boolean type with a
precision other than 1?
jeff