1 /* Test for the bad usage of "nonnull" function attribute parms. */
2 /* { dg-do compile } */
3 /* { dg-options "-Wnonnull-compare" } */
7 __attribute__((nonnull (1, 3))) int
8 foo (char *cp1
, char *cp2
, char *cp3
, char *cp4
)
10 if (cp1
== (char *) 0) /* { dg-warning "nonnull argument" "cp1 compared to NULL" } */
14 if (cp1
== (char *) 0) /* { dg-bogus "nonnull argument" } */
17 if (!cp4
) /* { dg-bogus "nonnull argument" } */
22 if (cp3
== (char *) 0) /* { dg-bogus "nonnull argument" } */