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