1 /* { dg-do compile } */
2 /* { dg-options "-Wsign-compare -Werror=sign-compare -Werror=switch-enum" } */
3 /* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
10 /* generates an error - ok */
11 x
+= x
< y
? 1 : 0; /* { dg-error "comparison" } */
13 #pragma GCC diagnostic push
14 #pragma GCC diagnostic ignored "-Wsign-compare"
15 /* generates no diagnostic - ok */
17 #pragma GCC diagnostic pop
19 x
+= x
< y
? 1 : 0; /* { dg-error "comparison" } */
30 #pragma GCC diagnostic push
31 #pragma GCC diagnostic ignored "-Wswitch-enum"
39 #pragma GCC diagnostic pop
41 switch (e
) /* { dg-error "switch" } */