131
|
1 // PR c++/79228
|
|
2 // { dg-do compile { target c++14 } }
|
|
3 // { dg-options "-Wpedantic" }
|
|
4
|
|
5 template <class,class> struct same;
|
|
6 template <class T> struct same<T,T> { };
|
|
7
|
|
8 int main()
|
|
9 {
|
|
10 same<decltype(0i),__complex int>{}; // { dg-warning "literal operator" }
|
|
11 // { dg-message "complex_literals" "" { target *-*-* } .-1 }
|
|
12 // { dg-message "built-in" "" { target *-*-* } .-2 }
|
|
13
|
|
14 same<decltype(0.0i),__complex double>{}; // { dg-warning "literal operator" }
|
|
15 // { dg-message "complex_literals" "" { target *-*-* } .-1 }
|
|
16 // { dg-message "built-in" "" { target *-*-* } .-2 }
|
|
17
|
|
18 same<decltype(0.0if),__complex float>{}; // { dg-warning "literal operator" }
|
|
19 // { dg-message "complex_literals" "" { target *-*-* } .-1 }
|
|
20 // { dg-message "built-in" "" { target *-*-* } .-2 }
|
|
21
|
|
22 same<decltype(0.0il),__complex long double>{}; // { dg-warning "literal operator" }
|
|
23 // { dg-message "complex_literals" "" { target *-*-* } .-1 }
|
|
24 // { dg-message "built-in" "" { target *-*-* } .-2 }
|
|
25 }
|