diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/warn/pr13358-3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/pr13358-3.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/warn/pr13358-3.C b/gcc/testsuite/g++.dg/warn/pr13358-3.C new file mode 100644 index 000000000..f23e7d97e --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/pr13358-3.C @@ -0,0 +1,24 @@ +// PR c++/13358: g++ should accept a long long constant sans LL suffix +// if -Wno-long-long is in use +// { dg-do compile } +// { dg-require-effective-target int32plus } +// { dg-options "-std=c++0x -pedantic-errors" } + + +void use_longlong () +{ + unsigned long long x1, x2, x3; + // make sure it's ok with hex, decimal and octal + x1 = 0x1b27da572ef3cd86; + x2 = 1956772631100509574; + x3 = 0154476645345674746606; +} + +void use_longlong2 () +{ + unsigned long long x1, x2, x3; + // make sure it's ok with hex, decimal and octal + x1 = 0x1b27da572ef3cd86LL; + x2 = 1956772631100509574LL; + x3 = 0154476645345674746606LL; +} |