From e9fcab6251336fe528de248ad37f640e3f03b450 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 8 Apr 2003 12:03:26 +0000 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/sstream.tcc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c4b62933d16..02ac8d95482 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-04-08 Alexandre Oliva + + * include/bits/sstream.tcc (overflow): Make sure operands of min + and max have the same type. + 2003-04-04 Jerry Quinn PR libstdc++/10276 diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc index 991cb13ef98..04b6289de8b 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))