home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / g / help / 1238 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  1.3 KB

  1. Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
  2. From: warwick@cs.uq.oz.au (Warwick Allison)
  3. Newsgroups: gnu.g++.help
  4. Subject: Re: inlines in .cc files?
  5. Message-ID: <10306@uqcspe.cs.uq.oz.au>
  6. Date: 16 Sep 92 03:15:21 GMT
  7. References: <1992Sep15.184527.12855@cs.ucla.edu>
  8. Sender: news@cs.uq.oz.au
  9. Reply-To: warwick@cs.uq.oz.au
  10. Lines: 26
  11.  
  12. jason@lanai.cs.ucla.edu (Jason Rosenberg) writes:
  13.  
  14. >Well, I guess you can't declare inline functions in .cc files, only in
  15. >.h files.  Is this correct?  It makes sense, otherwise how would 
  16. >incremental compiling work....
  17.  
  18. You CAN use inlines in .cc files, but only for statically used functions.
  19.  
  20. GCC acts perfectly.
  21.  
  22.  
  23. If you define an inline function in .cc files, no symbol is ever generated
  24. by the compiler (obviously, since no separate function exists).  Similarly,
  25. when declared in a .h file, no symbol is created.  Remember, .h files are
  26. nothing special, they are just textually included into the .cc files.  I'm
  27. not sure the compiler proper ever even looks at actual .h files, since they
  28. should be merged in by the pre-processor.
  29.  
  30.  
  31. --
  32. Warwick
  33. --
  34.   _-_|\      warwick@cs.uq.oz.au            /Disclaimer:
  35.  /     * <-- Computer Science Department,  /  
  36.  \_.-._/     University of Queensland,    /   C references are NULL && void*
  37.       v      Brisbane, Australia.        /  
  38.