From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: [Patch] inline.h should not define inline functions with "extern" linkage Date: Sat, 21 Jun 2003 11:30:42 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87el1ocj3x.fsf@zip.com.au> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056159123 13938 80.91.224.249 (21 Jun 2003 01:32:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2003 01:32:03 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jun 21 03:32:02 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19TXEX-0003cb-00 for ; Sat, 21 Jun 2003 03:32:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19TXDo-000750-9D for guile-devel@m.gmane.org; Fri, 20 Jun 2003 21:31:16 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19TXDV-00074t-Mk for guile-devel@gnu.org; Fri, 20 Jun 2003 21:30:57 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19TXDU-00074T-DZ for guile-devel@gnu.org; Fri, 20 Jun 2003 21:30:56 -0400 Original-Received: from snoopy.pacific.net.au ([61.8.0.36]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19TXDT-00072x-JA for guile-devel@gnu.org; Fri, 20 Jun 2003 21:30:55 -0400 Original-Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) h5L1UsYd022392; Sat, 21 Jun 2003 11:30:54 +1000 Original-Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h5L1UmQg020461; Sat, 21 Jun 2003 11:30:48 +1000 (EST) Original-Received: from localhost (ppp78.dyn228.pacific.net.au [203.143.228.78]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h5L1Ulnh018455; Sat, 21 Jun 2003 11:30:47 +1000 (EST) Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19TXDG-0006Hr-00; Sat, 21 Jun 2003 11:30:42 +1000 Original-To: Matthias Koeppe Mail-Copies-To: never In-Reply-To: (Matthias Koeppe's message of "Thu, 19 Jun 2003 14:51:55 +0200") User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2567 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2567 Matthias Koeppe writes: > > The "inline" keyword does not imply static linkage, and in fact > inline.h defines the functions `scm_cell' and `scm_double_cell' > explicitly with "extern" linkage. "extern inline" is a gcc-ism, as far as I'm aware. We use it in gmp.h, but only with gcc. > The patch below fixes it. inline.c defines the functions with > external linkage, and every file including inline.h defines static > inline copies. One possibility would be to do these things as macros, so as to avoid depending on the compiler having an inline, or whether it only actually inlines at certain optimization levels. You can imagine the sort of thing, setting a variable given to the macro, rather than a return value, #define SCM_I_MKBIG(big) do { SCM __scm_i_mkbig__temp = scm_double_cell (scm_tc16_big, 0, 0, 0); mpz_init (SCM_I_BIG_MPZ (__scm_i_mkbig__temp)); (big) = __scm_i_mkbig__temp; } while (0) _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel