aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Beshenov <bav.272304@gmail.com>2007-04-08 22:37:56 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-04-08 22:37:56 +0000
commitad1a64baff0c87db0707b57cf3c8e93b7d32dc4b (patch)
tree3ffe999a2a07342f5571eb7b5782caa69145d584
parentc586d32a1e2cc9997c4c9a05f08a33436710559d (diff)
downloadgcc-ad1a64baff0c87db0707b57cf3c8e93b7d32dc4b.zip
gcc-ad1a64baff0c87db0707b57cf3c8e93b7d32dc4b.tar.gz
gcc-ad1a64baff0c87db0707b57cf3c8e93b7d32dc4b.tar.bz2
re PR libstdc++/31511 (/usr/include/c++/bits/cmath.tcc: no match for ternary 'operator?:' in '((__n % 2u) != 0u) ? __x : 1')
2007-04-08 Alexey Beshenov <bav.272304@gmail.com> PR libstdc++/31511 * include/c_global/cmath.tcc (__cmath_power): Use _Tp(1). * include/c_std/cmath.tcc (__cmath_power): Likewise. From-SVN: r123665
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/c_global/cmath.tcc5
-rw-r--r--libstdc++-v3/include/c_std/cmath.tcc5
3 files changed, 12 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6600997..8785968 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-08 Alexey Beshenov <bav.272304@gmail.com>
+
+ PR libstdc++/31511
+ * include/c_global/cmath.tcc (__cmath_power): Use _Tp(1).
+ * include/c_std/cmath.tcc (__cmath_power): Likewise.
+
2007-04-06 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31117
diff --git a/libstdc++-v3/include/c_global/cmath.tcc b/libstdc++-v3/include/c_global/cmath.tcc
index ff87564..3e1bc50 100644
--- a/libstdc++-v3/include/c_global/cmath.tcc
+++ b/libstdc++-v3/include/c_global/cmath.tcc
@@ -1,6 +1,7 @@
// -*- C++ -*- C math library.
-// Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -42,7 +43,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
inline _Tp
__cmath_power(_Tp __x, unsigned int __n)
{
- _Tp __y = __n % 2 ? __x : 1;
+ _Tp __y = __n % 2 ? __x : _Tp(1);
while (__n >>= 1)
{
diff --git a/libstdc++-v3/include/c_std/cmath.tcc b/libstdc++-v3/include/c_std/cmath.tcc
index 472324a..a794630 100644
--- a/libstdc++-v3/include/c_std/cmath.tcc
+++ b/libstdc++-v3/include/c_std/cmath.tcc
@@ -1,6 +1,7 @@
// -*- C++ -*- C math library.
-// Copyright (C) 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -42,7 +43,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
inline _Tp
__cmath_power(_Tp __x, unsigned int __n)
{
- _Tp __y = __n % 2 ? __x : 1;
+ _Tp __y = __n % 2 ? __x : _Tp(1);
while (__n >>= 1)
{