[Openmp-commits] [PATCH] D65867: [RFC] [OpenMP] Turn on -Wall compiler warnings by default

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 12 11:55:31 PDT 2019


Hahnfeld marked an inline comment as done.
Hahnfeld added inline comments.


================
Comment at: openmp/cmake/config-ix.cmake:4-15
+check_c_compiler_flag(-Wall OPENMP_HAVE_WALL_FLAG)
 check_c_compiler_flag(-Werror OPENMP_HAVE_WERROR_FLAG)
 
+# Additional warnings that are not enabled by -Wall.
+check_cxx_compiler_flag(-Wcast-qual OPENMP_HAVE_WCAST_QUAL_FLAG)
+check_c_compiler_flag(-Wformat-pedantic OPENMP_HAVE_WFORMAT_PEDANTIC_FLAG)
+check_c_compiler_flag(-Wsign-compare OPENMP_HAVE_WSIGN_COMPARE_FLAG)
----------------
jlpeyton wrote:
> Should everything be check_cxx_compiler_flag()?
This was also my first feeling, but my second thought was that we might have C files again in the future. For example,  some very simple tools with OMPT might not need C++ and we'll want all warnings for them. However, that's a weak argument for now without a real use and I can change it to `check_cxx_compiler_flag` if you think that's more consistent.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65867/new/

https://reviews.llvm.org/D65867





More information about the Openmp-commits mailing list