re PR libstdc++/31511 (/usr/include/c++/bits/cmath.tcc: no match for ternary 'operato...
authorAlexey Beshenov <bav.272304@gmail.com>
Sun, 8 Apr 2007 22:37:56 +0000 (22:37 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 8 Apr 2007 22:37:56 +0000 (22:37 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/c_global/cmath.tcc
libstdc++-v3/include/c_std/cmath.tcc

index 660099780ac41b2e80f9658360bef08adc3954a5..8785968d9fbecf551abf1bad0ed306348c9b6dd7 100644 (file)
@@ -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
index ff875640caf5e6fba934abeeaddfa9e58a202535..3e1bc50a17c5f19ca9280b9b3e02ca468071b54b 100644 (file)
@@ -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)
         {
index 472324af03ed7911d9cbb21348e5166ecaea2cdc..a7946301e2a61a10a8cf46e8047bbd91a1b4b882 100644 (file)
@@ -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)
         {