On May 27, 2005, at 11:05 AM, Diego Novillo wrote:

This is happening in gcc.dg/tree-ssa/20040121-1.c.  The test
specifically tests that (p!=0) + (q!=0) should be computed as
int:

char *foo(char *p, char *q) {
    int x = (p !=0) + (q != 0);
    ...
}

Is this program legal C?

!= is defined to produce an int result in C.  This is valid, and
may produce a result of 0, 1, or 2.

Reply via email to