[RFC] sscanf vs ERANGE vs finitel
Paolo Carlini
pcarlini@suse.de
Sun Mar 21 16:17:00 GMT 2004
Paolo Carlini wrote:
> Andreas Schwab wrote:
>
>> Yes, Inf and NaN are both in range, but not finite.
>
> Ah, ok, now I see. You mean when INF, INFINITY and so on are parsed,
> sscanf does *not* set errno, indeed. I forgot that, my bad.
But now, I'm asking, *if* sscanf is not given in input the special strings
"inf", "infinity", and so on (this can never happen for the uses in the c++
runtime library, forgot to tell you!), in all the other cases, the
returned value
can only be inf when simultaneously ERANGE is set, right???
If this is true major simplifications are possible in those functions... ;)
Paolo.
More information about the Libstdc++
mailing list