[PATCH]: enable -Wcast-qual in cmake builds

Roman Divacky rdivacky at vlakno.cz
Thu Nov 13 11:25:14 PST 2014


ping... 

On Tue, Nov 11, 2014 at 10:48:50PM +0100, Roman Divacky wrote:
> Hi,
> 
> The inline patch enables -Wcast-qual in cmake builds. The warning
> is already enabled for autoconf builds. Note that clang doesnt
> yet support that warning. I posted a patch to implement that
> warning. LLVM+clang+lld build is -Wcast-qual safe.
> 
> Ok to commit?
> 
> Index: cmake/modules/HandleLLVMOptions.cmake
> ===================================================================
> --- cmake/modules/HandleLLVMOptions.cmake       (revision 221712)
> +++ cmake/modules/HandleLLVMOptions.cmake       (working copy)
> @@ -276,6 +276,7 @@
>  elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
>    if (LLVM_ENABLE_WARNINGS)
>      append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
> +    append("-Wcast-qual" CMAKE_CXX_FLAGS)
>  
>      # Turn off missing field initializer warnings for gcc to avoid noise from
>      # false positives with empty {}. Turn them on otherwise (they're off by
> 
> 
> Roman
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list