OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [warn/] [pr13358-2.C] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// PR c++/13358: g++ should accept a long long constant sans LL suffix
// PR c++/13358: g++ should accept a long long constant sans LL suffix
// if -Wno-long-long is in use.
// if -Wno-long-long is in use.
// { dg-do compile }
// { dg-do compile }
// { dg-require-effective-target int32plus }
// { dg-require-effective-target int32plus }
// { dg-options "-std=c++98 -pedantic-errors" }
// { dg-options "-std=c++98 -pedantic-errors" }
void use_longlong ()
void use_longlong ()
{
{
  unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not support 'long long'" }
  unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not support 'long long'" }
  // make sure we error with hex, decimal and octal
  // make sure we error with hex, decimal and octal
  x1 = 0x1b27da572ef3cd86; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
  x1 = 0x1b27da572ef3cd86; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
  x2 = 1956772631100509574; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
  x2 = 1956772631100509574; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
  x3 = 0154476645345674746606; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
  x3 = 0154476645345674746606; // { dg-error "integer constant is too large for 'long' type" "long long" { target ilp32 } }
}
}
void use_longlong2 ()
void use_longlong2 ()
{
{
  unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not support 'long long'" }
  unsigned long long x1, x2, x3; // { dg-error "ISO C\\+\\+ 1998 does not support 'long long'" }
  // make sure we error with hex, decimal and octal
  // make sure we error with hex, decimal and octal
  x1 = 0x1b27da572ef3cd86LL; // { dg-error "long long" }
  x1 = 0x1b27da572ef3cd86LL; // { dg-error "long long" }
  x2 = 1956772631100509574LL; // { dg-error "long long" }
  x2 = 1956772631100509574LL; // { dg-error "long long" }
  x3 = 0154476645345674746606LL; // { dg-error "long long" }
  x3 = 0154476645345674746606LL; // { dg-error "long long" }
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.