Skip to content

Commit 649c398

Browse files
committed
DNM nerf all warnings
1 parent 15bb6df commit 649c398

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

tools/skylark/drake_cc.bzl

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,37 @@ load("//tools/workspace:generate_file.bzl", "generate_file")
1717
# The CXX_FLAGS will be enabled for all C++ rules in the project
1818
# building with any compiler.
1919
CXX_FLAGS = [
20-
"-Werror=all",
21-
"-Werror=attributes",
22-
"-Werror=cpp",
23-
"-Werror=deprecated",
24-
"-Werror=deprecated-declarations",
25-
"-Werror=ignored-qualifiers",
26-
"-Werror=missing-declarations",
27-
"-Werror=old-style-cast",
28-
"-Werror=overloaded-virtual",
29-
"-Werror=shadow",
30-
"-Werror=unused-result",
20+
# "-Werror=all",
21+
# "-Werror=attributes",
22+
# "-Werror=cpp",
23+
# "-Werror=deprecated",
24+
# "-Werror=deprecated-declarations",
25+
# "-Werror=ignored-qualifiers",
26+
# "-Werror=missing-declarations",
27+
# "-Werror=old-style-cast",
28+
# "-Werror=overloaded-virtual",
29+
# "-Werror=shadow",
30+
# "-Werror=unused-result",
3131
# We eschew Eigen::IO in lieu of drake::fmt_eigen.
3232
# See drake/common/fmt_eigen.h for details.
3333
"-DEIGEN_NO_IO=1",
34+
"-w",
3435
]
3536

3637
# The CLANG_FLAGS will be enabled for all C++ rules in the project when
3738
# building with clang (excluding the Apple LLVM compiler see APPLECLANG_FLAGS
3839
# below).
3940
CLANG_FLAGS = CXX_FLAGS + [
40-
"-Werror=absolute-value",
41-
"-Werror=c99-designator",
42-
"-Werror=inconsistent-missing-override",
43-
"-Werror=final-dtor-non-final-class",
44-
"-Werror=literal-conversion",
45-
"-Werror=non-virtual-dtor",
46-
"-Werror=range-loop-analysis",
47-
"-Werror=return-stack-address",
48-
"-Werror=sign-compare",
49-
"-Werror=unqualified-std-cast-call",
41+
# "-Werror=absolute-value",
42+
# "-Werror=c99-designator",
43+
# "-Werror=inconsistent-missing-override",
44+
# "-Werror=final-dtor-non-final-class",
45+
# "-Werror=literal-conversion",
46+
# "-Werror=non-virtual-dtor",
47+
# "-Werror=range-loop-analysis",
48+
# "-Werror=return-stack-address",
49+
# "-Werror=sign-compare",
50+
# "-Werror=unqualified-std-cast-call",
5051
]
5152

5253
# The APPLECLANG_FLAGS will be enabled for all C++ rules in the project when
@@ -56,20 +57,20 @@ APPLECLANG_FLAGS = CLANG_FLAGS
5657
# The GCC_FLAGS will be enabled for all C++ rules in the project when
5758
# building with gcc.
5859
GCC_FLAGS = CXX_FLAGS + [
59-
"-Werror=extra",
60-
"-Werror=logical-op",
61-
"-Werror=non-virtual-dtor",
62-
"-Werror=return-local-addr",
63-
"-Werror=unused-but-set-parameter",
60+
# "-Werror=extra",
61+
# "-Werror=logical-op",
62+
# "-Werror=non-virtual-dtor",
63+
# "-Werror=return-local-addr",
64+
# "-Werror=unused-but-set-parameter",
6465
# This was turned on via -Wextra, but is too strict to have as an error.
65-
"-Wno-missing-field-initializers",
66+
# "-Wno-missing-field-initializers",
6667
]
6768

6869
# The GCC_CC_TEST_FLAGS will be enabled for all cc_test rules in the project
6970
# when building with gcc.
7071
GCC_CC_TEST_FLAGS = [
71-
"-Wno-missing-declarations",
72-
"-Wno-unused-parameter",
72+
# "-Wno-missing-declarations",
73+
# "-Wno-unused-parameter",
7374
]
7475

7576
# The GCC_VERSION_SPECIFIC_FLAGS will be enabled for all C++ rules in the
@@ -79,19 +80,19 @@ GCC_CC_TEST_FLAGS = [
7980
# as a Bazel external.)
8081
GCC_VERSION_SPECIFIC_FLAGS = {
8182
13: [
82-
"-Werror=pessimizing-move",
83-
"-Werror=uninitialized",
83+
# "-Werror=pessimizing-move",
84+
# "-Werror=uninitialized",
8485
# This falsely dings code that returns const references, e.g., our
8586
# MbP style for "add element" or "find by name" member functions.
86-
"-Wno-dangling-reference",
87+
# "-Wno-dangling-reference",
8788
# This falsely dings code inside Eigen.
88-
"-Wno-maybe-uninitialized",
89+
# "-Wno-maybe-uninitialized",
8990
# This falsely dings code inside libstdc++.
90-
"-Wno-stringop-overflow",
91+
# "-Wno-stringop-overflow",
9192
# These two falsely ding initializing an Eigen::Vector1d or Matrix1d.
9293
# Eigen uses 16-byte alignment, which these flags doesn't account for.
93-
"-Wno-array-bounds",
94-
"-Wno-stringop-overread",
94+
# "-Wno-array-bounds",
95+
# "-Wno-stringop-overread",
9596
],
9697
}
9798

0 commit comments

Comments
 (0)