[Bug libstdc++/81122] [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 27 01:01:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #11)
> (In reply to Ben Woodard from comment #10)
> > Also note: https://connect.microsoft.com/VisualStudio/feedback/details/742775
> >
> > My reading of:
> > https://wg21.link/lwg2381
> >
> > is that if the first part of the number includes a '.' then the portion
> > after the 'p' or 'P' is not part of the number and is left in the string.
> > The example is
> > 0x1a.bp+07p
> >
> > So I believe that your assertion that 2381 applies in this situation is not
> > accurate. This example refers to the number: 26.6875 (16+10+11/16) and
> > because there is already a hexadecimal point '.' separating the integral
> > portion from the fractional portion the 'p' is not part of the number.
>
> That just means it's a bad example in the proposed resolution, but the
> example is not normative anyway.
No, there's nothing wrong with the example. I don't know how you're
interpreting the spec but it seems wrong.
More information about the Gcc-bugs
mailing list