Testing Equal Pointers (was: detecting invalid pointers)

Prescott K. Turner turner at sdti.SDTI.COM
Tue Mar 28 04:23:00 AEST 1989


In article <375 at sdti.SDTI.COM> turner at sdti.SDTI.COM (I) write:
>But STANDARD C PROVIDES NO WAY at all to tell if two pointers point to the
>same object!
On second thought, the correct interpretation of the proposed standard is
probably that comparison for equality/inequality will always work in
those situations where the other relational pointer comparisons are
guaranteed to work.

>Why is this dismal situation reflected in the pANS?
Since compilers for MS-DOS and other tricky architectures will compare
pointers correctly that point within the same aggregate object, the
situation is not dismal.  Sorry for the flame.
--
Prescott K. Turner, Jr.
Software Development Technologies, Inc.
P.O. Box 366, Sudbury, MA 01776 USA         (508) 443-5779
UUCP: ...{harvard,mit-eddie}!sdti!turner    Internet: turner at sdti.sdti.com



More information about the Comp.std.c mailing list