This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: More front end type mismatch problems
On Fri, May 27, 2005 at 02:23:02PM -0400, Ian Lance Taylor wrote:
> The program is legal C. The _Bool values should be promoted to int
> before doing the addition.
>
OK, thanks.
> I guess that type cast is being lost somewhere.
>
It doesn't seem to be ever emitted. There are no casts in
.original:
int x = (p != 0B) + (q != 0B)
and the gimplifier carries on to emit:
D.1230 = p != 0B;
D.1231 = q != 0B;
x = D.1230 + D.1231;
Diego.