proposed patch for gcse.c (delete null pointer checks)

Richard Henderson rth@cygnus.com
Tue Nov 30 23:59:00 GMT 1999


On Mon, Nov 08, 1999 at 11:40:06AM -0500, Thomas R. Truscott wrote:
>     int *p = (int *) 0;
>   
>     printf("p is %d\n", *p);
>     if (p)

> Ironically, gcc deletes the "if" in both cases!

Of course it does.  This test case is simple enough
for ordinary methods of constant propogation to handle.


r~



More information about the Gcc-patches mailing list