OSDN Git Service

2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jan 2007 23:39:55 +0000 (23:39 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 7 Jan 2007 23:39:55 +0000 (23:39 +0000)
commitbaab3ea2c32aaac44a3f03bc51988ef4f07a659d
tree07b723f57f7162726fedfa539303bb8ba68f2b28
parent1a9745d21e1268a87f19cfda24155b849b8b11b2
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120558 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/conversion/nullptr1.C
gcc/testsuite/g++.dg/warn/Woverflow-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Woverflow-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Woverflow-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/multiple-overflow-warn-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/overflow-warn-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/overflow-warn-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/overflow-warn-4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/overflow-warn-5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/overflow-warn-6.C [new file with mode: 0644]