comparison gcc/testsuite/g++.dg/cpp1y/complex_literals2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
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 }