From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: External inline functions Date: Sun, 06 Nov 2011 21:39:53 +0100 Message-ID: <87fwi1asti.fsf@wanadoo.es> References: <83zkg9hzdg.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1320612017 6982 80.91.229.12 (6 Nov 2011 20:40:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Nov 2011 20:40:17 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 06 21:40:11 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RN9Vf-0007rS-C1 for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2011 21:40:07 +0100 Original-Received: from localhost ([::1]:35066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RN9Ve-00012q-NX for ged-emacs-devel@m.gmane.org; Sun, 06 Nov 2011 15:40:06 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:40893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RN9Vc-00011L-6N for emacs-devel@gnu.org; Sun, 06 Nov 2011 15:40:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RN9VZ-0003p6-M8 for emacs-devel@gnu.org; Sun, 06 Nov 2011 15:40:04 -0500 Original-Received: from impaqm2.telefonica.net ([213.4.138.18]:23071 helo=telefonica.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RN9VZ-0003nt-4O for emacs-devel@gnu.org; Sun, 06 Nov 2011 15:40:01 -0500 Original-Received: from IMPmailhost3.adm.correo ([10.20.102.124]) by IMPaqm2.telefonica.net with bizsmtp id tsM81h00S2h2L9m3Mwfv4k; Sun, 06 Nov 2011 21:39:55 +0100 Original-Received: from qcore ([2.138.3.15]) by IMPmailhost3.adm.correo with BIZ IMP id twft1h00H0KS9Ve1jwfuAQ; Sun, 06 Nov 2011 21:39:55 +0100 X-Brightmail-Tracker: AAAAAA== X-original-sender: 981711563@telefonica.net In-Reply-To: (Andreas Schwab's message of "Sun, 06 Nov 2011 20:00:37 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 213.4.138.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:145912 Archived-At: Andreas Schwab writes: > Eli Zaretskii writes: > >> Is this portable enough? The Microsoft compiler errors out during >> linking due to unresolved externals, but is this a problem specific to >> that compiler? > > Apparently this is not a C compiler. The inline specifier does not > influence the linkage. There are several issues here. First, `inline' was introduced in the 1999 standard. There is no mention to it in the 1990 standard. So, if the Microsoft compiler defaults to the 1990 standard it must be implementing `inline' in a vendor-dependent way. Second, my reading of the 1999 standard says that `inline' *does* affect linkage: 6.7.4 p6: ... If all of the file scope declarations for a function in a translation unit include the inline function specifier without extern, then the definition in that translation unit is an inline definition. An inline definition does not provide an external definition for the function, and does not forbid an external definition in another translation unit. ... but OTOH xdisp.c includes dispextern.h, which declares the function. Decorating the declaration of window_box_right with `extern' should work.