From owner-freebsd-arch@FreeBSD.ORG Mon Mar 9 13:58:20 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C26541065676; Mon, 9 Mar 2009 13:58:20 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep15-int.chello.at (viefep15-int.chello.at [62.179.121.35]) by mx1.freebsd.org (Postfix) with ESMTP id CCEE18FC14; Mon, 9 Mar 2009 13:58:19 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from edge01.upc.biz ([192.168.13.236]) by viefep12-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20090309134105.YBOH12380.viefep12-int.chello.at@edge01.upc.biz>; Mon, 9 Mar 2009 14:41:05 +0100 Received: from lizard.fafoe.narf.at ([213.47.85.26]) by edge01.upc.biz with edge id R1h41b00F0a5KZh011h58D; Mon, 09 Mar 2009 14:41:05 +0100 X-SourceIP: 213.47.85.26 Received: by lizard.fafoe.narf.at (Postfix, from userid 1001) id 81D95BC24; Mon, 9 Mar 2009 14:40:42 +0100 (CET) Date: Mon, 9 Mar 2009 14:40:42 +0100 From: Stefan Farfeleder To: Andrew Reilly Message-ID: <20090309134041.GA23152@lizard.fafoe.narf.at> References: <20090307103138.GA34456@zim.MIT.EDU> <49B2B139.6010104@freebsd.org> <20090308070924.GA39236@zim.MIT.EDU> <20090309105541.GA2464@duncan.reilly.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090309105541.GA2464@duncan.reilly.home> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: arch@FreeBSD.ORG, Sam Leffler Subject: Re: C99 inlines X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 13:58:21 -0000 On Mon, Mar 09, 2009 at 09:55:41PM +1100, Andrew Reilly wrote: > On Sun, Mar 08, 2009 at 03:09:24AM -0400, David Schultz wrote: > > My main motivation is that currently there's no easy way to use > > non-static inline functions that works with both gcc and other > > compilers. > > Please pardon my ignorance: what *is* non-static inline > behaviour? I've only ever used static inlines myself: they're > the only sort that make sense (to me), in the world of standard > C static compilation and linkage. What happens elsewhen? Does > the compiler generate a "real" function with an exportable name > that can be linked-to? Why would you want to do that, when > that's what perfectly ordinary functions do? I can't imagine an > extern inline meaning anything useful unless one can do > LLVM-style link-time optimization. Is that on the cards? With static inline functions you end up with a copy in each object file where the compiler decided to not inline at least one call, with an inline function with external linkage all these copies are coalesced to a single one.