This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC/RFA] Fix varobj.c value comparison problems
- From: "M.M. Kettenis" <m dot m dot kettenis at alumnus dot utwente dot nl>
- To: Andrew Cagney <cagney at gnu dot org>, Mark Kettenis <kettenis at gnu dot org>, gdb-patches at sources dot redhat dot com
- Date: Sun, 20 Feb 2005 02:05:00 +0000
- Subject: Re: [RFC/RFA] Fix varobj.c value comparison problems
Andrew Cagney <cagney@gnu.org> wrote:
> Mark, the thing that's missing is an automated testcase. Having
> something change from -0.0 to +0.0 should do it.
Ah, but that is the exact the opposite of what triggered this fix:
NaN != NaN
even though the bit pattern is the same, whereas
-0.0 == +0.0
even though the bit pattern is different. I caught the first one with
the existing testsuite although that's merely by accident. Writing a
test that does this reliable is tricky though as NaNs are handled
differently by different targets. Testing the second one should be possible. I'll look into it.
Meanwhile, I've checked in the patch.