Bug 1771075 - Enable C++20 -Wvolatile warnings. r=firefox-build-system-reviewers,glandium
We can enable C++20 -Wvolatile warnings in gcc before we compile as -std=c++20, but not in clang. These warnings will be enabled by default with gcc and clang -std=c++20, so we won't need to explicitly enable -Wvolatile after we're compiling as -std=c++20. Differential Revision: https://phabricator.services.mozilla.com/D165380
This commit is contained in:
@@ -99,6 +99,7 @@ check_and_add_warning("-Wc++2a-compat", cxx_compiler)
|
|||||||
check_and_add_warning("-Wcomma-subscript", cxx_compiler)
|
check_and_add_warning("-Wcomma-subscript", cxx_compiler)
|
||||||
check_and_add_warning("-Wenum-compare-conditional")
|
check_and_add_warning("-Wenum-compare-conditional")
|
||||||
check_and_add_warning("-Wenum-float-conversion")
|
check_and_add_warning("-Wenum-float-conversion")
|
||||||
|
check_and_add_warning("-Wvolatile", cxx_compiler)
|
||||||
|
|
||||||
# Downgrade some C++20 warnings-as-errors to warnings that we can fix after we
|
# Downgrade some C++20 warnings-as-errors to warnings that we can fix after we
|
||||||
# compile as C++20 (bug 1768116). They don't need to block upgrading to C++20.
|
# compile as C++20 (bug 1768116). They don't need to block upgrading to C++20.
|
||||||
@@ -108,8 +109,6 @@ check_and_add_warning("-Wno-error=deprecated-anon-enum-enum-conversion", cxx_com
|
|||||||
check_and_add_warning("-Wno-error=deprecated-enum-enum-conversion", cxx_compiler)
|
check_and_add_warning("-Wno-error=deprecated-enum-enum-conversion", cxx_compiler)
|
||||||
check_and_add_warning("-Wno-error=deprecated-pragma", cxx_compiler)
|
check_and_add_warning("-Wno-error=deprecated-pragma", cxx_compiler)
|
||||||
check_and_add_warning("-Wno-error=deprecated-this-capture", cxx_compiler)
|
check_and_add_warning("-Wno-error=deprecated-this-capture", cxx_compiler)
|
||||||
check_and_add_warning("-Wno-error=deprecated-volatile", cxx_compiler)
|
|
||||||
check_and_add_warning("-Wno-error=volatile", cxx_compiler)
|
|
||||||
|
|
||||||
# catches possible misuse of the comma operator
|
# catches possible misuse of the comma operator
|
||||||
check_and_add_warning("-Wcomma", cxx_compiler)
|
check_and_add_warning("-Wcomma", cxx_compiler)
|
||||||
|
|||||||
Reference in New Issue
Block a user