Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / Wenum-conversion.c
blob86033399b7db24031d195cdfd8bec3795a3e874f
1 /* { dg-do compile } */
2 /* { dg-options "-Wenum-conversion" } */
4 enum X { x1, x2 };
5 enum Y { y1, y2 };
7 enum X obj = y1; /* { dg-warning "implicit conversion from .enum Y. to .enum X." } */
8 enum Y obj2 = y1;
10 enum X obj3;
11 void foo()
13 obj3 = y2; /* { dg-warning "implicit conversion from .enum Y. to .enum X." } */
16 void bar(enum X);
17 void f(void)
19 bar (y1); /* { dg-warning "implicit conversion from .enum Y. to .enum X." } */