2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
commitf170d67f55d3a7c6d2025fb2d4e1e743c00cd83e
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Jan 2007 21:57:01 +0000 (5 21:57 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Jan 2007 21:57:01 +0000 (5 21:57 +0000)
tree6907cbd4435447e2f591dc2ff312abadddf5058a
parent67e05044e3bab06d9852ace68c499ce048ecb00d
2007-01-05  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

PR c/19978
* tree.h (TREE_OVERFLOW_P): New.
* c-typeck.c (parser_build_unary_op): Warn only if result
overflowed and operands did not.
(parser_build_binary_op): Likewise.
(convert_for_assignment): Remove redundant overflow_warning.
* c-common.c (overflow_warning): Don't check or set TREE_OVERFLOW.

cp/
* semantics.c (finish_unary_op_expr): Warn only if result
overflowed and operands did not.

testsuite/
* gcc.dg/multiple-overflow-warn-1.c: New.
* gcc.dg/multiple-overflow-warn-2.c: New.
* gcc.dg/overflow-warn-6.c: New.
* g++.dg/warn/multiple-overflow-warn-1.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120505 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-common.c
gcc/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/multiple-overflow-warn-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/multiple-overflow-warn-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/overflow-warn-6.c [new file with mode: 0644]
gcc/tree.h