aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wnonnull-9.c
blob: 1c57eefd2aefc01d2508e8332a6b71bbb6bf2540 (plain)
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" } */
}