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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [float-constant-double.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
 
3
/* Constant float values of type double in <float.h> are suffixed with L
4
   and cast to double so they can be used within code that uses pragma
5
   FLOAT_CONST_DECIMAL64.  If they were not suffixed then use of the macro
6
   would have them interpreted as _Decimal64, leading to errors when used
7
   in expressions with other operands of type double.  */
8
 
9
#include <float.h>
10
 
11
extern double a, b, c, d;
12
 
13
void
14
foo ()
15
{
16
  _Pragma ("STDC FLOAT_CONST_DECIMAL64 ON")
17
  a = 0.1d * DBL_MAX;
18
  b = DBL_EPSILON * 10.0d;
19
  c = DBL_MIN * 200.0d;
20
}

powered by: WebSVN 2.1.0

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