Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-10.c
blobdced20cf02c14e5d6385def934e230f0f349695a
1 /* { dg-do compile } */
2 /* { dg-options "-Wattributes -Werror" } */
3 /* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
5 /* Make sure #pragma can work with -Werror. */
7 #pragma GCC diagnostic error "-Waddress"
9 void __attribute__((dj)) bar() { } /* { dg-error ".* attribute directive ignored" } */
11 int i;
13 void
14 foo ()
16 if (&i) /* { dg-error ".* will always evaluate as 'true'" } */
17 grill ();