From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Michael Meissner Cc: jimb@cygnus.com, gdb-patches@sources.redhat.com, msnyder@cygnus.com Subject: Re: RFA: don't try to compare IEEE NaN's Date: Wed, 06 Jun 2001 23:21:00 -0000 Message-id: References: <20010606161750.C11452@cse.cygnus.com> X-SW-Source: 2001-06/msg00112.html 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.