This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: akbara <syedali011 at earthlink dot net>
- Date: Wed, 15 Aug 2001 11:44:35 -0400
- Cc: gcc at gcc dot gnu dot org, ejr at cs dot berkeley dot edu, kaih at khms dot westfalen dot de
- Organization: null soft
- References: <200108151601.f7FG1Od03663@banach.math.purdue.edu>
=)
cool.
i never really bothered with gcc3.0 to much, it ran pretty slow, and was giving me problems with
an arm emulator..
waiting for the next release ;)
laterz,
-akbar A.
On Wed, 15 Aug 2001 11:01:24 -0500 (EST)
Brad Lucier <lucier@math.purdue.edu> wrote:
> Re:
>
> > if there going to be doing stuff like
> > if (a_float == someinteger)
> >
> > imho this should be flagged off as a warning?
>
> There *is* a warning that does this in gcc-3.0:
>
> banach-292% gcc -Wfloat-equal -c test.c
> test.c: In function `test':
> test.c:4: warning: comparing floating point with == or != is unsafe
> banach-293% cat test.c
> int
> test (float a, int b)
> {
> return a == b;
> }
>
> Brad Lucier
--
"it's called Mario Twins, and I WANT TO PLAY IT"
http://vertexabuse.cjb.net