[PATCH] D54470: Avoid g++ warning spam
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 13 09:59:44 PST 2018
rnk requested changes to this revision.
rnk added a comment.
This revision now requires changes to proceed.
Adding -Wno-cast-function-type seems reasonable, but we should do it more carefully.
================
Comment at: cmake/modules/HandleLLVMOptions.cmake:583-586
# Disable -Wclass-memaccess, a C++-only warning from GCC 8 that fires on
# LLVM's ADT classes.
check_cxx_compiler_flag("-Wclass-memaccess" CXX_SUPPORTS_CLASS_MEMACCESS_FLAG)
append_if(CXX_SUPPORTS_CLASS_MEMACCESS_FLAG "-Wno-class-memaccess" CMAKE_CXX_FLAGS)
----------------
You should put this here and follow this pattern instead to avoid setting the -Wno- flag on old versions of GCC that don't support it. GCC normally does not warn about unrecognized -Wno- flags unless it emits a warning, in which case it warns about all the unrecognized -Wno- flags. That's less than ideal.
Repository:
rL LLVM
https://reviews.llvm.org/D54470
More information about the llvm-commits
mailing list