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++/19091] New: problem with string to double conversion (overflow situation)


Following conversion should overflow, and not return 8.02393e-308.  Same
problem, although different output, when reading "4E308" from standard input.

#include <iostream>
#include <sstream>
using namespace std;
int main()
{
  double r;
  istringstream s("+4E308");
  s >> r;
  cout << r << endl;
}

-- 
           Summary: problem with string to double conversion (overflow
                    situation)
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stefan dot becuwe at ua dot ac dot be
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386 linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19091


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