From 5e996b85dbfe016af4160acd70e110689b10c2d9 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 21 Sep 2017 13:56:05 -0400 Subject: no_sanitize is Clang 3.7+ Change-Id: Ifa67c3e5cc188db71fab389f20f55e7cbfc6de8d Reviewed-on: https://skia-review.googlesource.com/49747 Commit-Queue: Mike Klein Commit-Queue: Yuqian Li Reviewed-by: Yuqian Li --- include/private/SkFloatingPoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h index a131726d75..01afcd8942 100644 --- a/include/private/SkFloatingPoint.h +++ b/include/private/SkFloatingPoint.h @@ -108,7 +108,7 @@ static inline int sk_float_saturate2int(float x) { // Cast double to float, ignoring any warning about too-large finite values being cast to float. // Clang thinks this is undefined, but it's actually implementation defined to return either // the largest float or infinity (one of the two bracketing representable floats). Good enough! -#if defined(__clang__) +#if defined(__clang__) && (__clang_major__ * 1000 + __clang_minor__) >= 3007 __attribute__((no_sanitize("float-cast-overflow"))) #endif static inline float sk_double_to_float(double x) { -- cgit v1.2.3