Merge from mainline.
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-4.c
blob45d217b32331899e0d6e298d9521bab2301ccf8a
1 /* { dg-do compile } */
2 /* { dg-options "-Wattributes" } */
4 /* Make sure the pragma enables the error. */
6 #pragma GCC diagnostic error "-Walways-true"
8 void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
10 int i;
12 void
13 foo ()
15 if (&i) /* { dg-error "error: .* will always evaluate as 'true'" } */
16 grill ();