aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-04-08 12:03:26 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2003-04-08 12:03:26 +0000
commite9fcab6251336fe528de248ad37f640e3f03b450 (patch)
tree348c2aa5592876e50530c26a935927b72e0e7faa
parent799b33a028830934ff135f121d7048e2e6336e08 (diff)
downloadgcc-e9fcab6251336fe528de248ad37f640e3f03b450.zip
gcc-e9fcab6251336fe528de248ad37f640e3f03b450.tar.gz
gcc-e9fcab6251336fe528de248ad37f640e3f03b450.tar.bz2
sstream.tcc (overflow): Make sure operands of min and max have the same type.
* include/bits/sstream.tcc (overflow): Make sure operands of min and max have the same type. From-SVN: r65368
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/sstream.tcc4
2 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c4b6293..02ac8d9 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * include/bits/sstream.tcc (overflow): Make sure operands of min
+ and max have the same type.
+
2003-04-04 Jerry Quinn <jlquinn@optonline.net>
PR libstdc++/10276
diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc
index 991cb13..04b6289 100644
--- a/libstdc++-v3/include/bits/sstream.tcc
+++ b/libstdc++-v3/include/bits/sstream.tcc
@@ -1,6 +1,6 @@
// String based streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -90,7 +90,7 @@ namespace std
// In virtue of DR 169 (TC) we are allowed to grow more than
// one char the first time and also...
__size_type __len =
- std::max(_M_string.capacity() + 1, this->_M_buf_size_opt);
+ std::max(__size_type(_M_string.capacity() + 1), this->_M_buf_size_opt);
bool __testwrite = this->_M_out_cur < this->_M_out_end;
if (__builtin_expect(!__testwrite && __len > _M_string.max_size(), false))