• Subject: Re: bug in CMPPTRT
  • From: "Leif Svalgaard" <leif@xxxxxxxx>
  • Date: Fri, 29 Sep 2000 17:40:24 -0500

> If I understand correctly, CMPPTRT compares pointer type, not pointer
> values.
> Second operand null means "there is no pointer here".
> So result of first CMPPTRT means, that P is a pointer (it was initialized
> to bad value - probably NULL pointer, but still a pointer), and result of
> second CMPPTRT means that Q is not a pointer (was not initialized - only
> memory allocated).

The actual statement is:
if operand 2 is null (Gene's is) an equal condition occurs if a pointer does
not exist in the storage area identified by operand 1

Nothing about the pointer being valid or the object actually existing.
If you look at the generated code, you'll see that it only checks to
see if the appropriate bits are set in the upper 64 bits of the pointer.

In Gene's case, these bits are set for P (by the INIT) not for Q (no INIT),

| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.