Dominique Devienne wrote:
> sqlite3.c(17654): error #265: floating-point operation result is out of range
Could this error be reduced to a warning?
> // around line 17644
> - result = 1e308*1e308*s; /* Infinity */
> + result = 1e308*(1e308*s); /* Infinity */
C99 7.12 (<math.h>) says:
| 4 The macro INFINITY expands to a constant expression of type float
| representing positive or unsigned infinity, if available; else to
| a positive constant of type float that overflows at translation
| * In this case, using INFINITY will violate the constraint in 6.4.4
| and thus require a diagnostic.
So I guess an "#ifdef INFINITY" should be added.
This macro was introduced in C99 (as was strtod("INF")), so we still
need a fallback. And if we don't want to hack the IEEE float bit
pattern, the only choices are overflow or "1.0/0.0".
sqlite-users mailing list