| 1 |
/* { 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 |
} |