gcc/gcc/cp
Manuel López-Ibáñez 16fd4d2d71 re PR c++/28986 (Failure to diagnose overflow in constant expression)
2007-01-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c++/28986
cp/
	* typeck.c (build_binary_op): Call overflow_warning if
	TREE_OVERFLOW_P is true for the result and not for any of the
	operands.

testsuite/
	* g++.dg/conversion/nullptr1.C: Added overflow warning.
	* g++.dg/warn/overflow-warn-1.C: New.
	* g++.dg/warn/overflow-warn-3.C: New.
	* g++.dg/warn/overflow-warn-4.C: New.
	* g++.dg/warn/overflow-warn-5.C: New.
	* g++.dg/warn/overflow-warn-6.C: New.
	* g++.dg/warn/Woverflow-1.C: New.
	* g++.dg/warn/Woverflow-2.C: New.
	* g++.dg/warn/Woverflow-3.C: New.
	* g++.dg/warn/multiple-overflow-warn-2.C: New.

From-SVN: r120558
2007-01-07 23:39:55 +00:00
..
ChangeLog re PR c++/28986 (Failure to diagnose overflow in constant expression) 2007-01-07 23:39:55 +00:00
ChangeLog-1993
ChangeLog-1994
ChangeLog-1995
ChangeLog-1996
ChangeLog-1997
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog.tree-ssa
Make-lang.in
NEWS
call.c re PR c++/29632 (ICE on invalid code: regenerate_decl_from_template, at cp/pt.c:10969) 2006-12-04 18:00:32 +00:00
cfns.gperf
cfns.h
class.c re PR c++/19439 (Duplicate destructor accepted) 2007-01-06 01:06:04 +00:00
config-lang.in
cp-gimplify.c Merge gimple-tuples-branch into mainline. 2006-12-05 17:26:05 +00:00
cp-lang.c
cp-objcp-common.c cp-objcp-common.c (cp_expr_size): Return NULL in the case size is undefined. 2006-12-04 22:51:42 +00:00
cp-objcp-common.h
cp-tree.def cp-tree.def (STATIC_ASSERT): New. 2006-11-21 20:23:03 +00:00
cp-tree.h c-common.c (c_common_nodes_and_builtins): Since variants of void_type_node get built before it is given a name... 2007-01-02 14:23:26 +00:00
cvt.c re PR c++/29734 (ICE with vector in switch condition) 2006-11-21 10:41:27 +01:00
cxx-pretty-print.c cp-tree.def (STATIC_ASSERT): New. 2006-11-21 20:23:03 +00:00
cxx-pretty-print.h
decl.c c-common.c (c_common_nodes_and_builtins): Since variants of void_type_node get built before it is given a name... 2007-01-02 14:23:26 +00:00
decl.h
decl2.c * decl2.c: Fix a comment typo. 2006-12-28 06:48:38 +00:00
dump.c
error.c re PR c++/14329 ([4.1 only] badly formatted warnings for SRA replacements used uninitialized) 2006-12-03 18:24:42 -08:00
except.c
expr.c
friend.c re PR c++/29475 (incomplete template diagnostics.) 2006-11-20 21:15:44 +00:00
g++spec.c
init.c re PR c++/29475 (incomplete template diagnostics.) 2006-11-20 21:15:44 +00:00
lang-specs.h
lex.c cp-tree.def (STATIC_ASSERT): New. 2006-11-21 20:23:03 +00:00
mangle.c call.c (build_op_delete_call): Test user-visible type against size_type_node... 2006-11-04 00:51:51 +00:00
method.c decl.c (poplevel): Check DECL_INITIAL invariant. 2006-12-01 23:01:05 +00:00
name-lookup.c * name-lookup.c: Follow spelling conventions. 2006-12-02 01:44:17 +00:00
name-lookup.h
operators.def
optimize.c re PR c++/30168 (C++ constructors can cause invalid gimple to happen with complex typed variables) 2006-12-21 23:30:55 -08:00
parser.c re PR c++/29731 (ICE with statement expression as template parameter) 2006-12-31 16:09:07 +00:00
pt.c pt.c (tsubst): Propagate the need for structural equality checks when... 2007-01-05 14:16:48 +00:00
ptree.c
repo.c
rtti.c rtti.c (get_tinfo_decl): Handle return value from pushdecl_top_level_and_finish. 2006-11-30 21:53:57 +00:00
search.c re PR c++/29475 (incomplete template diagnostics.) 2006-11-20 21:15:44 +00:00
semantics.c re PR c/19978 (overflow in expression of constants should not cause multiple warnings) 2007-01-05 21:57:01 +00:00
tree.c c-common.c (c_common_nodes_and_builtins): Since variants of void_type_node get built before it is given a name... 2007-01-02 14:23:26 +00:00
typeck.c re PR c++/28986 (Failure to diagnose overflow in constant expression) 2007-01-07 23:39:55 +00:00
typeck2.c