This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r185524 - in /trunk/gcc: ChangeLog c-family/Cha...


Author: paolo
Date: Mon Mar 19 15:51:25 2012
New Revision: 185524

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185524
Log:
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.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wuseless-cast.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c.opt
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/rtti.c
    trunk/gcc/cp/tree.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/doc/invoke.texi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]