1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* { dg-do compile } */ /* { dg-options "-Wall" } */ void foo (int a[static 1]) { if ((void*)0 == a) /* { dg-warning "argument" "compared to NULL" } */ return; } int main () { foo ((void*)0); /* { dg-warning "argument 1 null where non-null expected" } */ }