From 3072b8aa971b6707189e9aab344475931ebfae5c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 19 Apr 2010 18:33:28 +0000 Subject: 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 --- Makefile.rules | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index 9414f634ad..0c8469a313 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 -- cgit v1.2.3