This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] sscanf vs ERANGE vs finitel


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]