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



Michael Snyder <msnyder@cygnus.com> writes:
> BTW, the reason for using a union as I did, rather than individual
> char, short, int etc. variables, was to make sure that the known bit
> pattern was actually larger than the type being tested -- so that we
> would know if, for instance, GDB was testing more bits than it
> should.

I don't think my patch breaks this property.  After I write to
testval.float_testval, the subsequent bytes are still 0xff.  And if a
double is no smaller than a float, it works for the double test, too.

If we're trying to catch more-bits-than-appropriate comparisons,
shouldn't the *_resultval variables be in a union with a distinct
background pattern, too?  Say, zeros?


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