re PR other/23572 (No warning for assigning a value to a 'float' variable that overfl...
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Thu, 22 Mar 2007 23:04:24 +0000 (23:04 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Thu, 22 Mar 2007 23:04:24 +0000 (23:04 +0000)
commit92ef5cf99970d490ebdd508c774b86bd4a821887
tree72ccc17238a98a5218797e0019368cff25e58e57
parentefa591c57ef118d3e21c0a1550a31fb00d75407e
re PR other/23572 (No warning for assigning a value to a 'float' variable that overflows with option -Wextra)

2007-03-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

PR other/23572
* c-lex.c (interpret_float): On overflow, emit pedantic warning if
infinities not supported, otherwise emit warning if -Woverflow. On
underflow, emit warning if -Woverflow.
* real.c (real_from_string): Return -1 if underflow, +1 if overflow
and 0 otherwise.
* real.h (real_from_string): Update declaration
testsuite/
* gcc.dg/float-range-4.c: New.
* gcc.dg/float-range-1.c: Update. Test for a warning.
* gcc.dg/float-range-3.c: New.
* gcc.dg/float-range-5.c: New.

From-SVN: r123137
gcc/ChangeLog
gcc/c-lex.c
gcc/real.c
gcc/real.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/float-range-1.c
gcc/testsuite/gcc.dg/float-range-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/float-range-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/float-range-5.c [new file with mode: 0644]