Title: [120922] trunk/Source/WTF
Revision
120922
Author
kbal...@webkit.org
Date
2012-06-21 06:26:42 -0700 (Thu, 21 Jun 2012)

Log Message

Compile error: 'bool std::isinf(float)' is not 'constexpr' with GCC 4.6 in C++11 mode
https://bugs.webkit.org/show_bug.cgi?id=88721

Reviewed by Csaba Osztrogonác.

Don't define these as consexpr because with gcc 4.6
they call non constexpr functions.
* wtf/MathExtras.h:
(std::wtf_isinf):
(std::wtf_isnan):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (120921 => 120922)


--- trunk/Source/WTF/ChangeLog	2012-06-21 13:12:43 UTC (rev 120921)
+++ trunk/Source/WTF/ChangeLog	2012-06-21 13:26:42 UTC (rev 120922)
@@ -1,3 +1,16 @@
+2012-06-21  Balazs Kelemen  <kbal...@webkit.org>
+
+        Compile error: 'bool std::isinf(float)' is not 'constexpr' with GCC 4.6 in C++11 mode
+        https://bugs.webkit.org/show_bug.cgi?id=88721
+
+        Reviewed by Csaba Osztrogonác.
+
+        Don't define these as consexpr because with gcc 4.6
+        they call non constexpr functions.
+        * wtf/MathExtras.h:
+        (std::wtf_isinf):
+        (std::wtf_isnan):
+
 2012-06-17  Filip Pizlo  <fpi...@apple.com>
 
         It should be possible to look at disassembly

Modified: trunk/Source/WTF/wtf/MathExtras.h (120921 => 120922)


--- trunk/Source/WTF/wtf/MathExtras.h	2012-06-21 13:12:43 UTC (rev 120921)
+++ trunk/Source/WTF/wtf/MathExtras.h	2012-06-21 13:26:42 UTC (rev 120922)
@@ -282,10 +282,10 @@
 #if COMPILER_QUIRK(GCC11_GLOBAL_ISINF_ISNAN)
 // A workaround to avoid conflicting declarations of isinf and isnan when compiling with GCC in C++11 mode.
 namespace std {
-    constexpr bool wtf_isinf(float f) { return std::isinf(f); }
-    constexpr bool wtf_isinf(double d) { return std::isinf(d); }
-    constexpr bool wtf_isnan(float f) { return std::isnan(f); }
-    constexpr bool wtf_isnan(double d) { return std::isnan(d); }
+    inline bool wtf_isinf(float f) { return std::isinf(f); }
+    inline bool wtf_isinf(double d) { return std::isinf(d); }
+    inline bool wtf_isnan(float f) { return std::isnan(f); }
+    inline bool wtf_isnan(double d) { return std::isnan(d); }
 };
 
 using std::wtf_isinf;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to