From f695264d30e63d951f46e6e5c9da063dda988ffe Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Thu, 2 Jul 2020 09:21:08 +0000 Subject: [PATCH] Broaden -Wno-tautological-type-limit-compare In https://dawn-review.googlesource.com/c/dawn/+/24162 it was added inside the is_win condition so it didn't take effect on Linux. TBR=enga@chromium.org TBR=senorblanco@chromium.org Bug: None Change-Id: Icc9ea20ed3a5ae4e5c514ce32bff88009ad82b1a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24240 Reviewed-by: Corentin Wallez Commit-Queue: Corentin Wallez --- src/common/BUILD.gn | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn index 540cbea024..dac8c00585 100644 --- a/src/common/BUILD.gn +++ b/src/common/BUILD.gn @@ -108,6 +108,12 @@ config("dawn_internal") { "-Wtautological-unsigned-zero-compare", ] + # Allow comparison against type limits that might be tautological on 32bit + # or 64bit systems. Without this the following produces an error on 64bit: + # + # if (myUint64 > std::numeric_limits::max()) {...} + cflags += [ "-Wno-tautological-type-limit-compare" ] + if (is_win) { cflags += [ # clang-cl doesn't know -pedantic, pass it explicitly to the clang driver @@ -115,13 +121,6 @@ config("dawn_internal") { # Allow the use of __uuidof() "-Wno-language-extension-token", - - # Allow comparison against type limits that might be tautological on - # 32bit or 64bit systems. Without this the following produces an error - # on 64bit: - # - # if (myUint64 > std::numeric_limits::max()) {...} - "-Wno-tautological-type-limit-compare", ] } else { cflags += [ "-pedantic" ]