From: Dan Gohman Date: Mon, 19 Apr 2010 18:33:28 +0000 (+0000) Subject: Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3072b8aa971b6707189e9aab344475931ebfae5c;p=oota-llvm.git Enable -Wcast-qual for C++ files, where intentional qualifier-stripping can be done with const_cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101798 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Makefile.rules b/Makefile.rules index 9414f634adc..0c8469a3133 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -633,6 +633,8 @@ CompileCommonOpts += -pedantic -Wno-long-long 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