2012-03-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14710
* doc/invoke.texi: Document -Wuseless-cast.
/c-family
2012-03-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14710
* c.opt ([Wuseless-cast]): Add.
/cp
2012-03-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14710
* cp-tree.h (maybe_warn_about_useless_cast): Declare.
* typeck.c (maybe_warn_about_useless_cast): Define.
(build_reinterpret_cast, build_const_cast,
build_static_cast, cp_build_c_cast): Use it.
* rtti.c (build_dynamic_cast): Likewise.
* pt.c (tsubst_copy_and_build, case CAST_EXPR): Increment/decrement
c_inhibit_evaluation_warnings before/after the build_* calls.
/testsuite
2012-03-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/14710
* g++.dg/warn/Wuseless-cast.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185524
138bc75d-0d04-0410-961f-
82ee72b054a4