This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/23572] No warning for assigning a value to a 'float' variable that overflows with option -Wextra



------- Comment #11 from manu at gcc dot gnu dot org  2007-03-22 23:04 -------
Subject: Bug 23572

Author: manu
Date: Thu Mar 22 23:04:24 2007
New Revision: 123137

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123137
Log:
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.

Added:
    trunk/gcc/testsuite/gcc.dg/float-range-3.c
    trunk/gcc/testsuite/gcc.dg/float-range-4.c
    trunk/gcc/testsuite/gcc.dg/float-range-5.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-lex.c
    trunk/gcc/real.c
    trunk/gcc/real.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/float-range-1.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23572


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]