summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-03-02 21:55:06 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-03-02 21:55:06 +0000
commitce4705e1cb34a5357418865e36d2d5e68ac7d58f (patch)
tree6c37d74480ee5839be6ab2c2d28900dec7d3f51a /gnu
parent42fb8f7a6e8c7329e512b5ab255c782f171bedda (diff)
Fix patently broken handling of ios_base::showpos: "cout << showpos <<
0" should output "+0", not "0". Diff from upstream (which is still GPLv2+) via Brad.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gcc/libstdc++-v3/include/bits/locale_facets.tcc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/gcc/libstdc++-v3/include/bits/locale_facets.tcc b/gnu/gcc/libstdc++-v3/include/bits/locale_facets.tcc
index d3c47ff9b7f..2e4e37c51c3 100644
--- a/gnu/gcc/libstdc++-v3/include/bits/locale_facets.tcc
+++ b/gnu/gcc/libstdc++-v3/include/bits/locale_facets.tcc
@@ -1015,13 +1015,13 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
if (__builtin_expect(__dec, true))
{
// Decimal.
- if (__v > 0)
+ if (__v >= 0)
{
if (__flags & ios_base::showpos
&& numeric_limits<_ValueT>::is_signed)
*--__cs = __lit[__num_base::_S_oplus], ++__len;
}
- else if (__v)
+ else
*--__cs = __lit[__num_base::_S_ominus], ++__len;
}
else if (__flags & ios_base::showbase && __v)