home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / std / cplus / 1891 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.0 KB  |  51 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!maxtal
  3. From: maxtal@extro.ucc.su.OZ.AU (John MAX Skaller)
  4. Subject: Re: Zero-length structures and pointer comparisons
  5. Message-ID: <1992Dec22.003752.26023@ucc.su.OZ.AU>
  6. Sender: news@ucc.su.OZ.AU
  7. Nntp-Posting-Host: extro.ucc.su.oz.au
  8. Organization: MAXTAL P/L C/- University Computing Centre, Sydney
  9. References: <BzCG7K.2sG@frumious.uucp> <1992Dec18.192202.17023@ucc.su.OZ.AU> <9235622.25712@mulga.cs.mu.OZ.AU>
  10. Date: Tue, 22 Dec 1992 00:37:52 GMT
  11. Lines: 38
  12.  
  13. In article <9235622.25712@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
  14. >maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
  15. >
  16. >>pat@frumious.uucp (Patrick Smith) writes:
  17. >>>   p == q   =>   ptrcmp(p,q) == 0
  18. >>
  19. >>    I'm NOT agreeing with this at present. I reject any relationship
  20. >>between p ? q and ptrcmp. On some machines any such relationship
  21. >>might make ptrcmp unimplementable, and thus defeat the proposal completely.
  22. >
  23. >I remain unconvinced that such a relationship is unimplementable on
  24. >some machines.
  25.  
  26.     On the 486 it is not in general possible to implement
  27. the comparison p==q for arbitrary logical addresses. If p and q
  28. are aliases only the operating system kernel could implement 
  29. the comparison, and if the OS happened not to support this,
  30. p==q could not be implemented.
  31.  
  32. >
  33. >>It is only Jims suggestion that ptrcmp might always return 0 that
  34. >>makes it possible to make its existence mandatory.
  35. >
  36. >A ptrcmp that always returned 0 would be useless, IMHO.
  37. >
  38.  
  39.     Not at all. My sort will still order the pointers
  40. into the total order, which in this case is anything.
  41.  
  42.     This is entirely different from the current situation
  43. where a sort based on the existing implementation defined <
  44. on pointers might not terminate.
  45.  
  46. -- 
  47. ;----------------------------------------------------------------------
  48.         JOHN (MAX) SKALLER,         maxtal@extro.ucc.su.oz.au
  49.     Maxtal Pty Ltd, 6 MacKay St ASHFIELD, NSW 2131, AUSTRALIA
  50. ;--------------- SCIENTIFIC AND ENGINEERING SOFTWARE ------------------
  51.