From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stephen Compall Newsgroups: gmane.lisp.guile.devel Subject: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS Date: 02 Dec 2003 15:22:34 +0000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1070382007 30210 80.91.224.253 (2 Dec 2003 16:20:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2003 16:20:07 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Dec 02 17:20:02 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARDFq-0003z3-00 for ; Tue, 02 Dec 2003 17:20:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ARE8e-0006P4-G4 for guile-devel@m.gmane.org; Tue, 02 Dec 2003 12:16:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ARDR5-0005z8-37 for guile-devel@gnu.org; Tue, 02 Dec 2003 11:31:39 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ARDPx-0004m5-6R for guile-devel@gnu.org; Tue, 02 Dec 2003 11:31:01 -0500 Original-Received: from [192.195.228.35] (helo=csserver.evansville.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1ARDPr-0004hq-NB for guile-devel@gnu.org; Tue, 02 Dec 2003 11:30:23 -0500 Original-Received: from csserver.evansville.edu (localhost.localdomain [127.0.0.1]) by csserver.evansville.edu (8.12.8/8.12.8) with ESMTP id hB2FMYvS028987 for ; Tue, 2 Dec 2003 09:22:34 -0600 Original-Received: (from sc87@localhost) by csserver.evansville.edu (8.12.8/8.12.8/Submit) id hB2FMYbb028983; Tue, 2 Dec 2003 15:22:34 GMT X-Authentication-Warning: csserver.evansville.edu: sc87 set sender to s11@member.fsf.org using -f Original-To: guile-devel@gnu.org Original-Lines: 26 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3103 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3103 --=-=-= I recently added -Wstrict-prototypes to my C warning list. However, this gives a warning for GCC 3.3.2 (at least) for both 1.6.x and HEAD, whenever you compile the output of SCM_DEFINE et al. I fixed it by seding 's,SCM (\*)(),SCM (\*)(void),' or something like that on the output of guile-snarf, as strict C prototypes require (void) rather than (), tested it with one of my native modules, and hope this will cause no major problems in guile at large. That is, given the semantics of ARBITRARY_ARGS, I don't think GCC will have problems, but idiosyncratic compilers might. I'm just randomly guessing here, by the way. Prototypes in C++ are always strict, and anyway allow (), so I left the C++ version as is. Patch attached. -- Stephen Compall or s11 or sirian A man does not look behind the door unless he has stood there himself. -- Du Bois diwn Ermes analyzer AMW ASDIC gamma industrial espionage Exon Shell Mena Bosnia president CDC BROMURE SP4 terrorism --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=strict-protos.patch Content-Description: patch to libguile/snarf.h --- snarf.h.~1.62.~ 2003-11-17 20:44:04.000000000 +0000 +++ snarf.h 2003-12-02 15:11:00.000000000 +0000 @@ -32,7 +32,7 @@ #define SCM_FUNC_CAST_ARBITRARY_ARGS SCM (*)() #else -#define SCM_FUNC_CAST_ARBITRARY_ARGS SCM (*)() +#define SCM_FUNC_CAST_ARBITRARY_ARGS SCM (*)(void) #endif /* Generic macros to be used in user macro definitions. --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--