Enable -pedantic and disable currently triggered warnings

This will help avoid the introduction of additional non-standard
code and the warnings can be reintroduced one by one.

Bug: dawn:394

Change-Id: Ib3cd63058f47d17ae5ef67b047887a3b263a7e64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20382
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2020-04-27 18:09:40 +00:00 committed by Commit Bot service account
parent 006020b04d
commit c05a0e1aac
1 changed files with 19 additions and 0 deletions

View File

@ -104,6 +104,25 @@ config("dawn_internal") {
"-Wstrict-prototypes", "-Wstrict-prototypes",
"-Wtautological-unsigned-zero-compare", "-Wtautological-unsigned-zero-compare",
] ]
# clang-cl doesn't know -pedantic, pass it explicitly to the clang driver on Windows
if (is_win) {
cflags += [ "/clang:-pedantic" ]
} else {
cflags += [ "-pedantic" ]
}
# Flags for -pedantic warnings that haven't been fixed yet.
cflags += [
"-Wno-c++20-designator",
"-Wno-four-char-constants",
"-Wno-gnu-anonymous-struct",
"-Wno-gnu-zero-variadic-macro-arguments",
"-Wno-language-extension-token",
"-Wno-microsoft-enum-value",
"-Wno-nested-anon-types",
"-Wno-vla-extension",
]
} }
} }