[C++ Patch] PR 50956

Paolo Carlini paolo.carlini@oracle.com
Wed Nov 2 17:33:00 GMT 2011


Hi,

this should restore -Wcast-qual to the 3.4.x (!) behavior, more or less. 
The diff seems large but the new code is essentially in the last 5 
lines. When fixing this issue the most subtle existing testcase to get 
right, IMHO, is c-c++-common/Wcast-qual-1.c. Duplicate warnings should 
not be an issue because, in input, the valid_p parameter of 
build_const_cast_1 essentially plays the role of c_cast_p afterwards and 
all the following check_for_casting_away_constness calls are protected 
by !c_cast_p.

Tested x86_64-linux.

Ok for mainline?

Thanks,
Paolo.

/////////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_50956
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111102/01b859e3/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_50956
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111102/01b859e3/attachment-0001.ksh>


More information about the Gcc-patches mailing list