Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
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 13:17:00 -0000	[thread overview]
Message-ID: <20010606161750.C11452@cse.cygnus.com> (raw)
In-Reply-To: <200106060615.JAA14470@is.elta.co.il>

On Wed, Jun 06, 2001 at 09:15:58AM +0300, Eli Zaretskii wrote:
> > From: Jim Blandy <jimb@zwingli.cygnus.com>
> > Date: Tue,  5 Jun 2001 22:41:45 -0500 (EST)
> > 
> > !   testval.float_testval = 2.7182818284590452354;/* long_long_checkpoint */
> > !   float_resultval     = float_func ();		
> > !   testval.double_testval = 3.14159265358979323846; /* float_checkpoint */
> > !   double_resultval    = double_func ();		
> 
> 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.  There are also mixed endian machines, where the bytes are
ordered one way, but the order of the words is different.  In supporting
embedded processors, we occasionally run into machines with weird floating
point formats, or that use IEEE formats, but don't support infinities,
denormals, or nans.  Also, there are a number of embedded targets that only
have single precision hardware floating point, and want sizeof(float) ==
sizeof(double).

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482


  parent reply	other threads:[~2001-06-06 13:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-05 20:40 Jim Blandy
2001-06-05 23:14 ` Eli Zaretskii
2001-06-06  6:54   ` Fernando Nasser
2001-06-06  7:27   ` Jim Blandy
2001-06-06  8:46     ` Eli Zaretskii
2001-06-06  9:15       ` Fernando Nasser
2001-06-06 11:38         ` Jim Blandy
2001-06-06 11:52           ` Fernando Nasser
2001-06-06 13:59             ` Michael Snyder
2001-06-06 23:20             ` Eli Zaretskii
2001-06-06 23:19           ` Eli Zaretskii
2001-06-06 10:37       ` Jim Blandy
2001-06-06 10:55         ` Michael Snyder
2001-06-06 11:04           ` Fernando Nasser
2001-06-06 11:15             ` Michael Snyder
2001-06-06 15:08           ` Jim Blandy
2001-06-06 23:19           ` Eli Zaretskii
2001-06-06 23:19         ` Eli Zaretskii
2001-06-07 10:38           ` Michael Snyder
2001-06-07 11:38             ` Eli Zaretskii
2001-06-06 13:17   ` Michael Meissner [this message]
2001-06-06 13:45     ` Fernando Nasser
2001-06-06 23:21     ` Eli Zaretskii
2001-06-06  6:45 ` Fernando Nasser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010606161750.C11452@cse.cygnus.com \
    --to=meissner@cygnus.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@cygnus.com \
    --cc=msnyder@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox