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 <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn
index 540cbea..dac8c00 100644
--- a/src/common/BUILD.gn
+++ b/src/common/BUILD.gn
@@ -108,6 +108,12 @@
"-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<size_t>::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 @@
# 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<size_t>::max()) {...}
- "-Wno-tautological-type-limit-compare",
]
} else {
cflags += [ "-pedantic" ]