home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / std / cplus / 1852 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.4 KB

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!olivea!hal.com!darkstar.UCSC.EDU!daniel
  2. From: daniel@cse.ucsc.edu (Daniel R. Edelson)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Pointer comparisons
  5. Message-ID: <1gt9qjINNsrr@darkstar.UCSC.EDU>
  6. Date: 18 Dec 92 19:46:27 GMT
  7. References: <BzDs2x.wA@frumious.uucp> <1992Dec17.151642.9954@bcrka451.bnr.ca> <1992Dec18.181029.1061@taumet.com>
  8. Organization: University of California, Santa Cruz (CE/CIS Boards)
  9. Lines: 22
  10. NNTP-Posting-Host: oak.ucsc.edu
  11.  
  12. In article <1992Dec18.181029.1061@taumet.com> steve@taumet.com (Steve Clamage) writes:
  13. >
  14. >Right.  In the C Standard, it is stated explicitly that two pointers
  15. >of the same type which compare equal point to the same object or
  16. >function.  There is no such statment for C++ in the ARM or in the
  17. >current C++ Committee working draft.
  18. >
  19. >Steve Clamage, TauMetric Corp, steve@taumet.com
  20.  
  21. There's also a problem regarding inline functions.
  22. Specifically, under common file-based C++ implementations, 
  23. the address of an inline function  can vary between
  24. compilation units. Thus, the requirement from
  25. Ansi C (Sec 3.3.9)
  26.     ``If two pointers to function types ... both point to
  27.     the same function, they compare equal.''
  28. is false under common C++ implementations. In my view, this
  29. suggests that perhaps it should be illegal to take the address 
  30. of an inline function.
  31.  
  32. Daniel Edelson
  33. daniel@cse.ucsc.edu
  34.