summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-10-31 18:27:17 -0500
committerNathan Binkert <binkertn@umich.edu>2003-10-31 18:27:17 -0500
commit5341e1aa9e3562d5217f3db87ca77238bf63f93e (patch)
treeb161a2c80994b44fe28ea0184b1cf73837288fcc /test
parent8835aae3e3a4a4830b8cb03a7eefaa429ff63173 (diff)
downloadgem5-5341e1aa9e3562d5217f3db87ca77238bf63f93e.tar.xz
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
Diffstat (limited to 'test')
-rw-r--r--test/strnumtest.cc2
1 files changed, 2 insertions, 0 deletions
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[])
{