home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / compiler / 1377 < prev    next >
Encoding:
Text File  |  1992-08-15  |  1.4 KB  |  33 lines

  1. Newsgroups: comp.compilers
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!yale.edu!yale!mintaka.lcs.mit.edu!spdcc!iecc!compilers-sender
  3. From: henry@zoo.toronto.edu (Henry Spencer)
  4. Subject: Re: Adding garbage collection to C++
  5. Reply-To: henry@zoo.toronto.edu (Henry Spencer)
  6. Organization: U of Toronto Zoology
  7. Date: Fri, 14 Aug 1992 21:29:17 GMT
  8. Approved: compilers@iecc.cambridge.ma.us
  9. Message-ID: <92-08-075@comp.compilers>
  10. References: <92-08-052@comp.compilers> <92-08-063@comp.compilers>
  11. Keywords: C, GC
  12. Sender: compilers-sender@iecc.cambridge.ma.us
  13. Lines: 18
  14.  
  15. our moderator writes:
  16. >[It is my impression that an ANSI C program is allowed to copy a pointer to
  17. >a long and later back to a pointer of the same type...
  18.  
  19. Yes, but it doesn't promise what you'll get.  Many older definitions of C
  20. promised that you could convert a pointer to a suitably-large integer
  21. (long isn't necessarily large enough!) and then back again unchanged.
  22. Some of the ANSI C drafts also promised that.  The final standard does
  23. not.
  24.  
  25. Don't feel bad about overlooking this, Dennis Ritchie missed it too...
  26. which is why even revised K&R2 gets this wrong.  (Unless there's been a
  27. chance for another revision recently; Dennis does know about this.)
  28. -- 
  29. Henry Spencer @ U of Toronto Zoology, henry@zoo.toronto.edu  utzoo!henry
  30. -- 
  31. Send compilers articles to compilers@iecc.cambridge.ma.us or
  32. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  33.