Debian Codegraph @

gcc/testsuite/gcc.dg/Wint-conversion-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fpermissive" } */
3
4 const char *
5 f1 (int flag)
6 {
7 return flag ? "" : 1; /* { dg-warning "pointer/integer type mismatch in conditional expression \\\[-Wint-conversion\\\]" } */
8 }
9
10 const char *
11 f2 (int flag)
12 {
13 return flag ? 1 : ""; /* { dg-warning "pointer/integer type mismatch in conditional expression \\\[-Wint-conversion\\\]" } */
14 }