1 // { dg-do compile { target c++11 } }
2 // { dg-options "-fext-numeric-literals" }
4 // Integer imaginary...
6 constexpr unsigned long long
7 operator"" i(unsigned long long n) // { dg-warning "shadowed by implementation" "" { target c++11_only } }
10 constexpr unsigned long long
11 operator"" I(unsigned long long n) // { dg-warning "shadowed by implementation" }
14 constexpr unsigned long long
15 operator"" j(unsigned long long n) // { dg-warning "shadowed by implementation" }
18 constexpr unsigned long long
19 operator"" J(unsigned long long n) // { dg-warning "shadowed by implementation" }
22 // Floating-point imaginary...
25 operator"" i(long double n) // { dg-warning "shadowed by implementation" "" { target c++11_only } }
26 { return 4.0L * n + 0.0L; }
29 operator"" I(long double n) // { dg-warning "shadowed by implementation" }
30 { return 4.0L * n + 1.0L; }
33 operator"" j(long double n) // { dg-warning "shadowed by implementation" }
34 { return 4.0L * n + 2.0L; }
37 operator"" J(long double n) // { dg-warning "shadowed by implementation" }
38 { return 4.0L * n + 3.0L; }
43 operator"" k(long double n) // { dg-warning "shadowed by implementation" }
44 { return 4 * (n + 1) + 0; }
47 operator"" K(long double n) // { dg-warning "shadowed by implementation" }
48 { return 4 * (n + 1) + 1; }
51 operator"" r(long double n) // { dg-warning "shadowed by implementation" }
52 { return 4 * (n + 1) + 2; }
55 operator"" R(long double n) // { dg-warning "shadowed by implementation" }
56 { return 4 * (n + 1) + 3; }
61 operator"" w(long double n) // { dg-warning "shadowed by implementation" }
62 { return 4 * (n + 2) + 0; }
65 operator"" W(long double n) // { dg-warning "shadowed by implementation" }
66 { return 4 * (n + 2) + 1; }
69 operator"" q(long double n) // { dg-warning "shadowed by implementation" }
70 { return 4 * (n + 2) + 2; }
73 operator"" Q(long double n) // { dg-warning "shadowed by implementation" }
74 { return 4 * (n + 2) + 3; }
89 auto kfp = 1.0k; // { dg-error "fixed-point types not supported" }
90 auto Kfp = 1.0K; // { dg-error "fixed-point types not supported" }
91 auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
92 auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
94 auto wfp = 1.0w; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
95 auto Wfp = 1.0W; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
96 auto qfp = 1.0q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
97 auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
100 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
101 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
102 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
103 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
104 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
105 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
106 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
107 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
108 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
109 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
110 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
111 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
112 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
113 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
114 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
115 // { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }