* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-1.c
blobd50e07c45f273ed90b8151e7c690b41337f98953
1 /* { dg-do compile } */
2 /* { dg-options "-Walways-true -Wattributes -Werror" } */
3 /* { dg-warning "warnings being treated as errors" "" {target "*-*-*"} 0 } */
5 /* This is the first in a series of test cases that test the
6 interaction between -Wfoo, -Werror, -Werror=foo, and #pragma GCC
7 diagnostic error foo. This one has all the bits we're testing, the
8 others are subsets of this one. */
10 #pragma GCC diagnostic error "-Walways-true"
12 void __attribute__((dj)) bar() { } /* { dg-warning "warning: .* attribute directive ignored" } */
14 int i;
16 void
17 foo ()
19 if (&i) /* { dg-error "error: .* will always evaluate as 'true'" } */
20 grill ();