Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / Wcxx-compat-9.c
blob8a3867c11c9868b54e3dc42fb28cc127bfc2b272
1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
4 enum e { FIRST, LAST };
6 extern void f2 (enum e);
8 void
9 f1 ()
11 enum e v;
13 for (v = FIRST; v < LAST; ++v) /* { dg-warning "invalid in C\[+\]\[+\]" } */
14 f2 (v);
15 for (v = FIRST; v < LAST; v++) /* { dg-warning "invalid in C\[+\]\[+\]" } */
16 f2 (v);
17 for (v = LAST; v > FIRST; --v) /* { dg-warning "invalid in C\[+\]\[+\]" } */
18 f2 (v);
19 for (v = LAST; v > FIRST; v--) /* { dg-warning "invalid in C\[+\]\[+\]" } */
20 f2 (v);