re PR c++/39415 (static_cast used as downcast can silently lose const)
authorJames Dennett <jdennett@google.com>
Fri, 12 Nov 2010 18:00:21 +0000 (18:00 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 12 Nov 2010 18:00:21 +0000 (13:00 -0500)
commitd780189f23bdad447d7520f46ec1d3258a115d82
treec13c89e13244110928c0efb339650e53955d063b
parent47c217252a6ddb70babcaf3b544a17a3b33bd80f
re PR c++/39415 (static_cast used as downcast can silently lose const)

PR c++/39415
* typeck.c (build_static_cast_1): Convert to the target type
when doing static_cast<cv Derived*>(Base*).

From-SVN: r166667
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/expr/static_cast7.C [new file with mode: 0644]