home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
- From: warwick@cs.uq.oz.au (Warwick Allison)
- Newsgroups: gnu.g++.help
- Subject: Re: inlines in .cc files?
- Message-ID: <10306@uqcspe.cs.uq.oz.au>
- Date: 16 Sep 92 03:15:21 GMT
- References: <1992Sep15.184527.12855@cs.ucla.edu>
- Sender: news@cs.uq.oz.au
- Reply-To: warwick@cs.uq.oz.au
- Lines: 26
-
- jason@lanai.cs.ucla.edu (Jason Rosenberg) writes:
-
- >Well, I guess you can't declare inline functions in .cc files, only in
- >.h files. Is this correct? It makes sense, otherwise how would
- >incremental compiling work....
-
- You CAN use inlines in .cc files, but only for statically used functions.
-
- GCC acts perfectly.
-
-
- If you define an inline function in .cc files, no symbol is ever generated
- by the compiler (obviously, since no separate function exists). Similarly,
- when declared in a .h file, no symbol is created. Remember, .h files are
- nothing special, they are just textually included into the .cc files. I'm
- not sure the compiler proper ever even looks at actual .h files, since they
- should be merged in by the pre-processor.
-
-
- --
- Warwick
- --
- _-_|\ warwick@cs.uq.oz.au /Disclaimer:
- / * <-- Computer Science Department, /
- \_.-._/ University of Queensland, / C references are NULL && void*
- v Brisbane, Australia. /
-