Article View: comp.std.c++
Article #1223Re: Zero-length structures and pointer comparisons
From: Dag Bruck
Date: Sat, 12 Dec 1992 21:52
Date: Sat, 12 Dec 1992 21:52
18 lines
1081 bytes
1081 bytes
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
Technical Details
Message-ID:
<1992Dec12.215255.29154@lth.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!usc!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!news.lth.se!dagReferences:
<1992Dec8.103218.27689@lth.se> <9234423.15066@mulga.cs.mu.OZ.AU> <1992Dec9.133956.29659@lth.se> <1992Dec12.155417.2628@ucc.su.OZ.AU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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