* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / Werror-9.c
blob5b287793f556f2adbd17d2470ef52851d50f2ae1
1 /* { dg-do compile } */
2 /* { dg-options "-Wattributes" } */
4 /* Make sure #pragma can enable a warning as an 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 ();