From: Martin Str|mberg Newsgroups: comp.os.msdos.djgpp Subject: Re: "Inline" functions in C header/source files Date: Sat, 21 Jul 2001 00:28:56 +0000 (UTC) Organization: University of Lulea, Sweden Lines: 16 Message-ID: <995675336.39519@queeg.ludd.luth.se> References: <20010720192958 DOT 28775 DOT 00000394 AT ng-cu1 DOT news DOT cs DOT com> X-Trace: news.luth.se 995675336 25629 130.240.16.109 (21 Jul 2001 00:28:56 GMT) X-Complaints-To: abuse AT luth DOT se User-Agent: tin/pre-1.4-981225 ("Volcane") (UNIX) (SunOS/4.1.4 (sun4m)) Cache-Post-Path: queeg.ludd.luth.se!unknown AT father DOT ludd DOT luth DOT se X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Andrew Clifton wrote: : If I change some_function to : be "extern inline" I get undefined reference link errors. Using "static inline" : works, but I have a feeling that it might actually be including a copy of the : function in the object file for each source. Note that I'm not an expert on inline. Well, what do you expect? If you ask for inline, that would mean you _do_ want every instance of the function to be copied into each invocation of said function. Right, MartinS