pointer comparisons in dpANS C
Doug Gwyn
gwyn at smoke.BRL.MIL
Sun Oct 23 06:05:47 AEST 1988
In article <1988Oct21.143640.10468 at ateng.ateng.com> chip at ateng.ateng.com (Chip Salzenberg) writes:
>According to chris at mimsy.UUCP (Chris Torek):
>>Every address returned by malloc must compare as not distinct from
>>every other address, lest this routine delete the wrong object.
In case I misled anyone by a previous posting, (in)equality comparison
of pointers (having appropriate types) is supposed to work according to
the proposed ANS for C even when the pointers are not into the same
object. It is the order-relational comparison that requires that the
pointers be into the same object.
More information about the Comp.std.c
mailing list