This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: multiple defintions error
- To: Jan Dvorak <johnydog at go dot cz>
- Subject: Re: multiple defintions error
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Tue, 26 Sep 2000 16:29:34 +0100 (BST)
- CC: Atif Shahab <atif at viewinternet dot com dot sg>, gcc at gcc dot gnu dot org
> It is like you copy&paste such function into each source file, so no
> performance penalities occurs. It is IMHO the only way how to share
> functions which has to be inlined.
No, there is also the 'extern inline' extension of gcc.
This way, you can have just a single out-of-line copy of the function,
giving a lower code size and better cache usage.