home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1819 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.8 KB  |  48 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!uunet.ca!frumious!pat
  3. From: pat@frumious.uucp (Patrick Smith)
  4. Subject: Re: Zero-length structures and pointer comparisons
  5. Message-ID: <BzDn1s.uv@frumious.uucp>
  6. Date: Thu, 17 Dec 1992 00:08:15 GMT
  7. Reply-To: uunet.ca!frumious!pat
  8. References: <1992Dec9.191606.5665@lucid.com> <BzCG7K.2sG@frumious.uucp> <1992Dec16.202711.22367@bcrka451.bnr.ca>
  9. Organization: None
  10. Lines: 36
  11.  
  12. sjm@bcrki65.bnr.ca (Stuart MacMartin) writes:
  13. |In article <BzCG7K.2sG@frumious.uucp> pat@frumious.uucp (Patrick Smith) writes:
  14. |>
  15. |>jss@lucid.com (Jerry Schwarz) writes:
  16. |>|And
  17. |>|
  18. |>|       if p < q is defined,  ptrcmp(p,q) < 0   <=>  p < q
  19. |>
  20. |>
  21. |>This strikes me as nice to have, but not essential.
  22. |
  23. |It makes me nervous to disagree with you, but haven't we already 
  24. |hammered to death the concept that p < q might be defined (but 
  25. |not generate a total ordering) if some ps and qs are not in the
  26. |same segment?  Or do the PC compilers only permit p < q for ps
  27. |and qs in the same array?
  28.  
  29. Please don't be nervous, Stuart!  I make _lots_ of mistakes.
  30. (No smiley here, because it's quite true.)
  31.  
  32. This seems to depend on what one means by "p < q is defined".
  33. I can't say what Jerry meant, but (without thinking about it
  34. too much), I took him to mean something something like
  35. "if the standard defines what p < q means".  Which I _thought_
  36. meant p and q had to point to objects in the same array or
  37. subobjects of the same object.  And p < q does have to behave
  38. as expected in those cases (with some of the "subobjects
  39. of the same object" cases being legal exceptions).
  40.  
  41. The emphasis on _thought_ is because then I looked at the
  42. draft standard.  More on that in another posting...
  43.  
  44. -- 
  45. Patrick Smith
  46. uunet.ca!frumious!pat
  47. pat%frumious.uucp@uunet.ca
  48.