PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-6.c
blob0818ae329176cb9a7d4eb03af9f2c9e62e57af30
1 /* { dg-do compile } */
2 /* { dg-options "-Wattributes -Werror=address" } */
3 /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
4 /* Make sure -Werror=foo emits an error and not a warning */
6 void grill ();
7 void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */
9 int i;
11 void
12 foo ()
14 if (&i) /* { dg-error ".* will always evaluate as 'true'" } */
15 grill ();