Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/enum1.C

raw
1 // PR c++/92974 - bogus location for enum and non-enum in ?: warning.
2 // { dg-options "-Wextra" }
3
4 enum { X };
5
6 struct S {
7 template <typename T>
8 void f(T) { unsigned int g(X ?: g); } // { dg-warning "enumerated and non-enumerated type in conditional expression" }
9 };
10
11 struct S2 {
12 S m;
13 void l() { m.f(1); }
14 };