Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wsign-promo1.C

raw
1 // Check that we get joust warnings from comparing the final champ to a
2 // candidate between it and the previous champ.
3
4 // { dg-additional-options -Wsign-promo }
5
6 struct A { A(int); };
7
8 enum E { e };
9
10 int f(int, A);
11 int f(unsigned, A);
12 int f(int, int);
13
14 int i = f(e, 42); // { dg-warning "passing 'E'" }
15 // { dg-warning "in call to 'int f" "" { target *-*-* } .-1 }