This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 libstdc++/81122] New: parsing f stopped after '0' when reading std::hexfloat >> f;


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81122

            Bug ID: 81122
           Summary: parsing f stopped after '0' when reading std::hexfloat
                    >> f;
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kohlhz@t-online.de
  Target Milestone: ---

Created attachment 41578
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41578&action=edit
commented example showing the effect

Any reading of hexfloat values is stopping after '0',
e.g. 
  std::istringstream("0x1P-1022") >> std::hexfloat >> f;
yields f = 0, next char to read is 'x'.

I'm not knowing the standard reaction, but found an example source giving the
expected result.
My source taken in parts from this source:
http://naipc.uchicago.edu/2014/ref/cppreference/en/cpp/io/manip/fixed.html

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