[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A problem with cin or strtod?

From: Joseph S. Myers
Subject: Re: A problem with cin or strtod?
Date: Fri, 9 Feb 2001 18:53:20 +0000 (GMT)

On 9 Feb 2001, Daniel P. Katz wrote:

>         I ran into a problem where (cin >> x) for double x reads in
> NaN as a double, even though this seems not to be in accordance with
> the C++ standard.  It seems to me that the problem is either with cin
> (in g++) or strtod(3) (in glibc), and since I don't have the C and C++
> standards in front of me, I'm not quite sure which of them is the
> problematic element.  Therefore, I am sending this to the bug streams
> for both g++ and glibc.

It is a documented limitation of glibc that only the C99 semantics are
available from strtod, not the ones from the old standard.  See
CONFORMANCE in glibc 2.2.  (This could in principle be fixed, if felt
worthwhile, by using different versions of strtod and __REDIRECT.)

Joseph S. Myers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]