home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!uunet.ca!frumious!pat
- From: pat@frumious.uucp (Patrick Smith)
- Subject: Re: Zero-length structures and pointer comparisons
- Message-ID: <BzDn1s.uv@frumious.uucp>
- Date: Thu, 17 Dec 1992 00:08:15 GMT
- Reply-To: uunet.ca!frumious!pat
- References: <1992Dec9.191606.5665@lucid.com> <BzCG7K.2sG@frumious.uucp> <1992Dec16.202711.22367@bcrka451.bnr.ca>
- Organization: None
- Lines: 36
-
- sjm@bcrki65.bnr.ca (Stuart MacMartin) writes:
- |In article <BzCG7K.2sG@frumious.uucp> pat@frumious.uucp (Patrick Smith) writes:
- |>
- |>jss@lucid.com (Jerry Schwarz) writes:
- |>|And
- |>|
- |>| if p < q is defined, ptrcmp(p,q) < 0 <=> p < q
- |>
- |>
- |>This strikes me as nice to have, but not essential.
- |
- |It makes me nervous to disagree with you, but haven't we already
- |hammered to death the concept that p < q might be defined (but
- |not generate a total ordering) if some ps and qs are not in the
- |same segment? Or do the PC compilers only permit p < q for ps
- |and qs in the same array?
-
- Please don't be nervous, Stuart! I make _lots_ of mistakes.
- (No smiley here, because it's quite true.)
-
- This seems to depend on what one means by "p < q is defined".
- I can't say what Jerry meant, but (without thinking about it
- too much), I took him to mean something something like
- "if the standard defines what p < q means". Which I _thought_
- meant p and q had to point to objects in the same array or
- subobjects of the same object. And p < q does have to behave
- as expected in those cases (with some of the "subobjects
- of the same object" cases being legal exceptions).
-
- The emphasis on _thought_ is because then I looked at the
- draft standard. More on that in another posting...
-
- --
- Patrick Smith
- uunet.ca!frumious!pat
- pat%frumious.uucp@uunet.ca
-