Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / udlit-overflow-neg.C
blob93ed5379243ccc45ece63d3f4ff4f430ad27ef16
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-Woverflow" }
3 // PR c++/52654
4 int
5 operator ""_w(unsigned long long)
6 { return 0; }
8 int
9 operator ""_w(long double)
10 { return 0.0L; }
12 int i = 12345678901234567890123456789012345678901234567890_w;
13 int j = 12345678901234567890123456789.012345678901234567890e+1234567890_w;
14 int k = 12345678901234567890123456789.012345678901234567890e-1234567890_w;
16 // { dg-warning "integer literal exceeds range of " "" { target *-*-* } 12 }
17 // { dg-warning "floating literal exceeds range of " "" { target *-*-* } 13 }
18 // { dg-warning "floating literal truncated to zero" "" { target *-*-* } 14 }