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