gcc/testsuite/gcc.dg/Werror-6.c
raw| 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 */ |
| 5 | |
| 6 | void grill (); |
| 7 | void __attribute__((dj)) bar() { } /* { dg-warning ".* attribute directive ignored" } */ |
| 8 | |
| 9 | int i; |
| 10 | |
| 11 | void |
| 12 | foo () |
| 13 | { |
| 14 | if (&i) /* { dg-error ".* will always evaluate as 'true'" } */ |
| 15 | grill (); |
| 16 | } |