From 5341e1aa9e3562d5217f3db87ca77238bf63f93e Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 31 Oct 2003 18:27:17 -0500 Subject: Make the to_number function work better. base/str.cc: Make some fixes for the to_number function. Fix overflow calculation for maximum decimal value. (Note: minimum decimal value for signed numbers does not work correctly, e.g. it will overflow on -128 for a signed char though -127 will work) Fix overflow calculation for hex values being converted into signed types Fix up the debugging stuff a little to make sure the values are always printed as numbers. test/strnumtest.cc: using namespace std for g++ 3 --HG-- extra : convert_revision : b00bb1296c85c3d64d8864283c9374e1563bfa31 --- test/strnumtest.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/strnumtest.cc b/test/strnumtest.cc index e971a7dfd..d491b8b5d 100644 --- a/test/strnumtest.cc +++ b/test/strnumtest.cc @@ -33,6 +33,8 @@ #include "base/str.hh" +using namespace std; + int main(int argc, char *argv[]) { -- cgit v1.2.3