зеркало из https://github.com/mozilla/gecko-dev.git
b22c76c625
compiler-opts.m4's check for `MOZ_CXX_SUPPORTS_WARNING(-W, unreachable-code-return, ac_cxx_has_wunreachable_code_return)` is broken. The C/C++ code that configure emits for MOZ_CXX_SUPPORTS_WARNING() actually contains a -Wunreachable-code-return warning and, thus, doesn't actually detect that clang supports the -Wunreachable-code-return flag. This configure code in MOZ_CXX_SUPPORTS_WARNING(): AC_TRY_COMPILE([], [return(0);], $3="yes", $3="no") generates something like: int main() { return(0); ; return 0; } where the second return, automatically emitted by configure, is unreachable and causes a -Wunreachable-code-return warning. The fix is to remove the redundant return(0) from MOZ_CXX_SUPPORTS_WARNING(). This allows clang's -Wunreachable-code-return flag to be detected, but then -Wunreachable-code-return breaks other configure checks, including third-party libraries' configure checks (in particular jemalloc) that also have redundant `return(0)`. So all the third-party libraries' configure checks would need to be fixed upstream, which seems like more hassle than the value of the -Wunreachable-code-return warnings. |
||
---|---|---|
.. | ||
acwinpaths.m4 | ||
alloc.m4 | ||
altoptions.m4 | ||
android.m4 | ||
arch.m4 | ||
clang-plugin.m4 | ||
clean-config.sh | ||
codeset.m4 | ||
compiler-opts.m4 | ||
config.guess | ||
config.status.m4 | ||
config.sub | ||
expandlibs.m4 | ||
ffi.m4 | ||
frameptr.m4 | ||
hooks.m4 | ||
hotfixes.m4 | ||
icu.m4 | ||
install-sh | ||
ios.m4 | ||
jemalloc.m4 | ||
linux.m4 | ||
lto.m4 | ||
mozcommonheader.m4 | ||
mozheader.m4 | ||
mozprog.m4 | ||
nspr-build.m4 | ||
nspr.m4 | ||
nss.m4 | ||
pkg.m4 | ||
rust.m4 | ||
subconfigure.m4 | ||
toolchain.m4 | ||
winsdk.m4 | ||
wrapper.m4 | ||
zlib.m4 |