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: jimb at zwingli dot 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: Wed, 6 Jun 2001 09:15:58 +0300 (IDT)
- CC: gdb-patches at sources dot redhat dot com, msnyder at cygnus dot com
- References: <20010606034145.7D5065E9CB@zwingli.cygnus.com>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> 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.