[llvm-commits] [llvm] r101798 - /llvm/trunk/Makefile.rules
Dan Gohman
gohman at apple.com
Mon Apr 19 11:33:28 PDT 2010
Author: djg
Date: Mon Apr 19 13:33:28 2010
New Revision: 101798
URL: http://llvm.org/viewvc/llvm-project?rev=101798&view=rev
Log:
Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can
be done with const_cast.
Modified:
llvm/trunk/Makefile.rules
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=101798&r1=101797&r2=101798&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Mon Apr 19 13:33:28 2010
@@ -633,6 +633,8 @@
endif
CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \
$(EXTRA_OPTIONS)
+# Enable cast-qual for C++; the workaround is to use const_cast.
+CXX.Flags += -Wcast-qual
ifeq ($(HOST_OS),HP-UX)
CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
More information about the llvm-commits
mailing list