This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug stdio/15917] scanf %f doesn't parse "0e+0" correctly


https://sourceware.org/bugzilla/show_bug.cgi?id=15917

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
I'm confused why this issue even happened, since parsing of hex floats should
be completely separate from parsing of decimal floats (the allowed forms are
sufficiently different, not to mention the computations to compute the values
to store). I guess the leading 0 is already eaten before it's determined that
the input is not hex.

Anyway, 0xe+0 is not nonsense, but parsing of course should stop just before
the plus sign. Also, it should be noted that 0x.e+0 is invalid for scanf but
valid for strtod (here, strtod only reads the first character).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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