This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: RFA: don't try to compare IEEE NaN's



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.


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