1 /* Test warning for comparison non-null address with null pointer constant. */
2 /* Origin: Pawel Sikora <pluto@agmk.net> */
3 /* { dg-do compile } */
4 /* { dg-options "-Waddress" } */
7 void f() { if ( z
) z(); } /* { dg-warning "always evaluate as" } */
8 void g() { if ( z
!= 0 ) z(); } /* { dg-warning "the comparison will always evaluate as 'true'" } */
9 void h() { if ( z
!= (void*)0 ) z(); } /* { dg-warning "the comparison will always evaluate as 'true'" } */