From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: (no subject) Date: Tue, 03 Nov 2009 20:57:20 +0000 Message-ID: <87ljin8gy7.fsf@ossau.uklinux.net> References: <8763ay88d6.fsf@gnu.org> <87vdi6sc5m.fsf@gnu.org> <87hbtciouk.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1261399917 28255 80.91.229.12 (21 Dec 2009 12:51:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2009 12:51:57 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Dec 21 13:51:50 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NMhjp-0001yi-SL for guile-devel@m.gmane.org; Mon, 21 Dec 2009 13:51:50 +0100 Original-Received: from localhost ([127.0.0.1]:40789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NMhjq-0006sS-1d for guile-devel@m.gmane.org; Mon, 21 Dec 2009 07:51:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5QSG-0006oC-32 for guile-devel@gnu.org; Tue, 03 Nov 2009 15:58:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5QSB-0006ly-A6 for guile-devel@gnu.org; Tue, 03 Nov 2009 15:58:15 -0500 Original-Received: from [199.232.76.173] (port=41099 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5QSB-0006ln-4s for guile-devel@gnu.org; Tue, 03 Nov 2009 15:58:11 -0500 Original-Received: from mail3.uklinux.net ([80.84.72.33]:53854) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5QS6-0004q5-Aj; Tue, 03 Nov 2009 15:58:06 -0500 Original-Received: from arudy (host86-147-112-196.range86-147.btcentralplus.com [86.147.112.196]) by mail3.uklinux.net (Postfix) with ESMTP id 4CC921F694F; Tue, 3 Nov 2009 20:57:27 +0000 (GMT) Original-Received: from arudy (arudy [127.0.0.1]) by arudy (Postfix) with ESMTP id 880CB38024; Tue, 3 Nov 2009 20:57:21 +0000 (GMT) In-Reply-To: <87hbtciouk.fsf@gnu.org> ("Ludovic =?iso-8859-1?Q?Court=E8s?= =?iso-8859-1?Q?=22's?= message of "Mon, 02 Nov 2009 22:44:19 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9781 Archived-At: ludo@gnu.org (Ludovic Court=A8=A8s) writes: > should be OK. However, I=A1=AFm slightly concerned about MSVC=A1=AFs > __declspec: does it work if it sees: > > __declspec(dllexport) extern SCM foo (SCM); > extern SCM foo (SCM); I don't know for sure, but I know I've seen "function redeclared with different linkage" warnings in the past, and this could well be one of the situations that generates such warnings. But what about using SCM_API instead of extern? Wouldn't that always generate the right code? (At least for building guile itself.) > If it works, that probably means this point is moot. > > 2. The automatically added =A1=AEextern=A1=AF declaration makes > =A1=AE-Wmissing-prototypes=A1=AF useless, which is annoying. I guess it depends if the primitives in question are designed to be used only from Scheme, or also from other C files. If they're only for Scheme, it's a nice feature that SCM_DEFINE does everything needed and the developer doesn't need a matching prototype. If they're for other C files, the missing prototype warning could be helpful. Then again, the developer will get some kind of warning anyway when trying to use the function from another file. So I think the balance is in favour of SCM_DEFINE including the prototype. Neil