Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-4.c
blob85505230b6c2d92fed40f73bd1c74caf8ded0cee
1 /* { dg-do compile } */
2 /* { dg-options "-Wattributes" } */
3 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
4 /* Make sure the pragma enables the error. */
6 #pragma GCC diagnostic error "-Waddress"
8 void grill ();
9 void __attribute__((dj)) bar() { } /* { dg-warning "attribute directive ignored" } */
11 int i;
13 void
14 foo ()
16 if (&i) /* { dg-error "will always evaluate as 'true'" } */
17 grill ();