Title: [184393] trunk/Source/WTF
Revision
184393
Author
[email protected]
Date
2015-05-15 09:46:46 -0700 (Fri, 15 May 2015)

Log Message

Build fix for some versions of clang.

* wtf/SaturatedArithmetic.h:
(signedAddOverflows):
(signedSubtractOverflows):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (184392 => 184393)


--- trunk/Source/WTF/ChangeLog	2015-05-15 15:32:11 UTC (rev 184392)
+++ trunk/Source/WTF/ChangeLog	2015-05-15 16:46:46 UTC (rev 184393)
@@ -1,3 +1,11 @@
+2015-05-15  Dan Bernstein  <[email protected]>
+
+        Build fix for some versions of clang.
+
+        * wtf/SaturatedArithmetic.h:
+        (signedAddOverflows):
+        (signedSubtractOverflows):
+
 2015-05-14  Dan Bernstein  <[email protected]>
 
         Reverted r177753, now that <rdar://problem/19347133> is fixed.

Modified: trunk/Source/WTF/wtf/SaturatedArithmetic.h (184392 => 184393)


--- trunk/Source/WTF/wtf/SaturatedArithmetic.h	2015-05-15 15:32:11 UTC (rev 184392)
+++ trunk/Source/WTF/wtf/SaturatedArithmetic.h	2015-05-15 16:46:46 UTC (rev 184393)
@@ -39,7 +39,7 @@
 
 inline bool signedAddOverflows(int32_t a, int32_t b, int32_t& result)
 {
-#if COMPILER_HAS_CLANG_BUILTIN(__builtin_sadd_overflow)
+#if COMPILER_HAS_CLANG_BUILTIN(__builtin_sadd_overflow) && !(defined __clang_major__ && __clang_major__ < 7)
     return __builtin_sadd_overflow(a, b, &result);
 #else
     uint32_t ua = a;
@@ -71,7 +71,7 @@
 
 inline bool signedSubtractOverflows(int32_t a, int32_t b, int32_t& result)
 {
-#if COMPILER_HAS_CLANG_BUILTIN(__builtin_ssub_overflow)
+#if COMPILER_HAS_CLANG_BUILTIN(__builtin_ssub_overflow) && !(defined __clang_major__ && __clang_major__ < 7)
     return __builtin_ssub_overflow(a, b, &result);
 #else
     uint32_t ua = a;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to