home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!usc!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!news.lth.se!dag
- From: dag@bellman.control.lth.se (Dag Bruck)
- Newsgroups: comp.std.c++
- Subject: Re: Zero-length structures and pointer comparisons
- Message-ID: <1992Dec12.215255.29154@lth.se>
- Date: 12 Dec 92 21:52:55 GMT
- References: <1992Dec8.103218.27689@lth.se> <9234423.15066@mulga.cs.mu.OZ.AU> <1992Dec9.133956.29659@lth.se> <1992Dec12.155417.2628@ucc.su.OZ.AU>
- Sender: news@lth.se
- Organization: Department of Automatic Control, Lund, Sweden
- Lines: 18
-
- In <comp.std.c++> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- >In article <...> dag@seldon.control.lth.se (Dag Bruck) writes:
- >>
- >>Suggested semantics: for any pointers p and q:
- >>
- >> p == q <=> ptrcmp(p,q) == 0
- >
- > Are you SURE you need this? Why should == and ptrcmp
- >be in any way related?
-
- Because it would be very counter-intuitive, hence error-prone, if that
- equality did not hold.
-
- I also support the additional rule suggested by Jerry Schwarz:
-
- if (p < q) is defined:
-
- p < q <=> ptrcmp(p,q) < 0
-