delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/10/08:19:34

Date: Tue, 10 Nov 1998 14:03:07 +0100
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Message-Id: <199811101303.OAA03081@acp3bf.physik.rwth-aachen.de>
To: djgpp AT delorie DOT com
Subject: Re: Can't inline routines from other moudles
Newsgroups: comp.os.msdos.djgpp
Organization: RWTH Aachen, III. physikalisches Institut B
X-Newsreader: TIN [version 1.2 PL2]
Reply-To: djgpp AT delorie DOT com

In article <Pine DOT SUN DOT 3 DOT 91 DOT 981108194129 DOT 14294D-100000 AT is> you wrote:

> The way to inline library functions is to copy their definitions into 
> your source, or to write your own substitutes for them.  Is it really 
> worth this hassle?

AFAIK, the optimal method for inlining functions across module borders
is the 'extern inline' extension provided by DJGPP: you duplicate the
function in the *header file* for that module, and mark it as 'extern
inline', while keeping the normal version inside the module .c
file. That way, other modules can use either the inlined version from
the header file, or link in the separate function. Which method is to
be used is entirely gcc's choice, then.

--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019