Debian Codegraph @

gcc/testsuite/gcc.dg/pr123856.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Wenum-conversion" } */
3
4 typedef __attribute__((__hardbool__)) int A, B;
5
6 B b;
7 void bar(A) { }
8 void foo() { bar(b); } /* { dg-warning "implicit conversion" } */
9
10 void bar2(__attribute__((__hardbool__)) int) { }
11 void foo2() { bar2(b); } /* { dg-warning "implicit conversion" } */
12
13 __attribute__((__hardbool__)) int c;
14 void bar3(__attribute__((__hardbool__)) int) { }
15 void foo3() { bar2(c); } /* { dg-warning "implicit conversion" } */
16
17 void bar4(int) { }
18 void foo4() { bar2(c); } /* { dg-warning "implicit conversion" } */
19