Bug 1389243 - Enable -Wparentheses when available r?glandium
MozReview-Commit-ID: OO8qt0Xh4c
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -59,16 +59,19 @@ check_and_add_gcc_warning('-Wloop-analys
check_and_add_gcc_warning('-Wc++11-compat-pedantic', cxx_compiler)
check_and_add_gcc_warning('-Wc++14-compat', cxx_compiler)
check_and_add_gcc_warning('-Wc++14-compat-pedantic', cxx_compiler)
check_and_add_gcc_warning('-Wc++1z-compat', cxx_compiler)
# catches possible misuse of the comma operator
check_and_add_gcc_warning('-Wcomma', cxx_compiler)
+# Warn if parentheses are omitted in certain contexts
+check_and_add_gcc_warning('-Wparentheses', cxx_compiler)
+
# catches unintentional switch case fallthroughs
check_and_add_gcc_warning('-Wimplicit-fallthrough', cxx_compiler)
# catches expressions used as a null pointer constant
# XXX: at the time of writing, the version of clang used on the OS X test
# machines has a bug that causes it to reject some valid files if both
# -Wnon-literal-null-conversion and -Wsometimes-uninitialized are
# specified. We work around this by instead using