[libc-commits] [libc] [libc] [Task] Prepare to enable disabled warnings (PR #122835)
Vinay Deshmukh via libc-commits
libc-commits at lists.llvm.org
Thu Jan 16 04:04:01 PST 2025
================
@@ -25,34 +25,47 @@ function(_get_common_test_compile_options output_var c_test flags)
list(APPEND compile_options "-ffixed-point")
endif()
- # list(APPEND compile_options "-Wall")
- # list(APPEND compile_options "-Wextra")
+ list(APPEND compile_options "-Wall")
+ list(APPEND compile_options "-Wextra")
# -DLIBC_WNO_ERROR=ON if you can't build cleanly with -Werror.
if(NOT LIBC_WNO_ERROR)
- # list(APPEND compile_options "-Werror")
+ list(APPEND compile_options "-Werror")
endif()
- # list(APPEND compile_options "-Wconversion")
- # list(APPEND compile_options "-Wno-sign-conversion")
- # list(APPEND compile_options "-Wimplicit-fallthrough")
- # list(APPEND compile_options "-Wwrite-strings")
- # list(APPEND compile_options "-Wextra-semi")
+ list(APPEND compile_options "-Wconversion")
+ list(APPEND compile_options "-Wno-sign-conversion")
+ list(APPEND compile_options "-Wimplicit-fallthrough")
+ list(APPEND compile_options "-Wwrite-strings")
+ list(APPEND compile_options "-Wextra-semi")
# Silence this warning because _Complex is a part of C99.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT c_test)
list(APPEND compile_options "-fext-numeric-literals")
endif()
- else()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
+ list(APPEND compile_options "-Wnewline-eof")
+ list(APPEND compile_options "-Wnonportable-system-include-path")
+ list(APPEND compile_options "-Wstrict-prototypes")
+ list(APPEND compile_options "-Wthread-safety")
+ # TODO(https://github.com/llvm/llvm-project/issues/119281) triggered in TEST_F implementation
+ list(APPEND compile_options "-Wno-global-constructors")
+
+ # TODO(https://github.com/llvm/llvm-project/issues/119281)
+ # These have been disabled for the time being to create explicit PRs for each change.
+ list(APPEND compile_options "-Wno-unused-parameter")
+ list(APPEND compile_options "-Wno-implicit-int-conversion")
+ list(APPEND compile_options "-Wno-shorten-64-to-32")
+ list(APPEND compile_options "-Wno-float-conversion")
+ list(APPEND compile_options "-Wno-implicit-float-conversion")
+ list(APPEND compile_options "-Wno-extra-semi")
+
+
list(APPEND compile_options "-Wno-c99-extensions")
list(APPEND compile_options "-Wno-gnu-imaginary-constant")
----------------
vinay-deshmukh wrote:
@nickdesaulniers
Should we also remove these `no-*` warnings? I didn't notice them earlier, but while I do the other PRs, I can take a look at enabling these as well?
https://github.com/llvm/llvm-project/pull/122835
More information about the libc-commits
mailing list