This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: don't try to compare IEEE NaN's
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: RFA: don't try to compare IEEE NaN's
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 7 Jun 2001 09:22:34 +0300 (IDT)
- cc: jimb at cygnus dot com, gdb-patches at sources dot redhat dot com, msnyder at cygnus dot com
On Wed, 6 Jun 2001, Michael Meissner wrote:
> > I think it is better to initialize the integral members of the union
> > with an explicit bit pattern, just not a pattern which gets
> > interpreted as a NaN of an Inf. With initialization such as above,
> > you risk losing due to subtleties of compile-time conversion of a
> > literal constant to a floating-point value. This is a GDB test suite,
> > so we are not interested in testing the compiler.
>
> Which means the test suite will break if you ever run it on a machine that
> doesn't have IEEE floating point, such as the VAX if anybody still builds gdb
> for that machine.
Those machines obviously require a different bit pattern. But the
principle is the same: if you want a specific bit pattern in an FP
variable, the only sure way is to put it there manually.
In other words, portability has nothing to do with this. We are
trying to see if an FP value is handled correctly by GDB on a
particular machine, and those tests are inherently machine specific.