URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
301 |
jeremybenn |
// PR c++/13358: g++ should accept a long long constant sans LL suffix
|
2 |
|
|
// if -Wno-long-long is in use.
|
3 |
|
|
// { dg-do compile }
|
4 |
|
|
// { dg-require-effective-target int32plus }
|
5 |
|
|
// { dg-options "-std=c++98 -pedantic-errors" }
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
void use_longlong ()
|
9 |
|
|
{
|
10 |
|
|
unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not support 'long long'" }
|
11 |
|
|
// make sure we error with hex, decimal and octal
|
12 |
|
|
x1 = 0x1b27da572ef3cd86; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
|
13 |
|
|
x2 = 1956772631100509574; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
|
14 |
|
|
x3 = 0154476645345674746606; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
|
15 |
|
|
}
|
16 |
|
|
|
17 |
|
|
void use_longlong2 ()
|
18 |
|
|
{
|
19 |
|
|
unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not support 'long long'" }
|
20 |
|
|
// make sure we error with hex, decimal and octal
|
21 |
|
|
x1 = 0x1b27da572ef3cd86LL; // { dg-error "long long" }
|
22 |
|
|
x2 = 1956772631100509574LL; // { dg-error "long long" }
|
23 |
|
|
x3 = 0154476645345674746606LL; // { dg-error "long long" }
|
24 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.