Commit ab871981 authored by Paul Eggert's avatar Paul Eggert

Port better to non-IEEE platforms

* src/lread.c (string_to_number) [!IEEE_FLOATING_POINT]:
Do not use the INFINITY macro, since the C standard requires
it to provoke a compile-time error on platforms that do not
support infinities.
parent ee2509bd
......@@ -3762,6 +3762,7 @@ string_to_number (char const *string, int base, int flags)
cp++;
while ('0' <= *cp && *cp <= '9');
}
#if IEEE_FLOATING_POINT
else if (cp[-1] == '+'
&& cp[0] == 'I' && cp[1] == 'N' && cp[2] == 'F')
{
......@@ -3769,7 +3770,6 @@ string_to_number (char const *string, int base, int flags)
cp += 3;
value = INFINITY;
}
#if IEEE_FLOATING_POINT
else if (cp[-1] == '+'
&& cp[0] == 'N' && cp[1] == 'a' && cp[2] == 'N')
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment