r166453 - in /trunk: gcc/cp/ChangeLog gcc/cp/cl...

jason@gcc.gnu.org jason@gcc.gnu.org
Mon Nov 8 20:17:00 GMT 2010


Author: jason
Date: Mon Nov  8 20:17:42 2010
New Revision: 166453

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166453
Log:
	Correct conversion/overflow behavior.
	* cvt.c (ignore_overflows): Move here from typeck.c.
	(ocp_convert): Use it.
	(cp_fold_convert): Use it.  Don't call rvalue.
	* typeck.c (build_static_cast_1): Don't use it.  Do call rvalue.
	* error.c (location_of): Handle expressions, too.
	* class.c (check_bitfield_decl): Set input_location around call to
	cxx_constant_value.
	* semantics.c (cxx_eval_outermost_constant_expr): Don't
	print the expression if it already had TREE_OVERFLOW set.
	(reduced_constant_expression_p): Check TREE_OVERFLOW_P for C++98, too.
	(verify_constant): Allow overflow with a permerror if we're
	enforcing.
	(cxx_eval_outermost_constant_expr): Use verify_constant.
	(adjust_temp_type): Use cp_fold_convert.
	* decl.c (build_enumerator): Don't call constant_expression_warning.
	* decl2.c (grokbitfield): Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/testsuite/20_util/ratio/cons/cons_overflow_neg.cc

Changes in other areas also in this revision:
Added:
    trunk/gcc/testsuite/g++.dg/expr/overflow1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/cp/cvt.c
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/decl2.c
    trunk/gcc/cp/error.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/warn/overflow-warn-1.C
    trunk/gcc/testsuite/g++.dg/warn/overflow-warn-3.C
    trunk/gcc/testsuite/g++.dg/warn/overflow-warn-4.C
    trunk/gcc/testsuite/g++.dg/warn/overflow-warn-5.C



More information about the Libstdc++-cvs mailing list