unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stephen Compall <s11@member.fsf.org>
Subject: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS
Date: 02 Dec 2003 15:22:34 +0000	[thread overview]
Message-ID: <xfyfzg31byd.fsf@csserver.evansville.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch to libguile/snarf.h --]
[-- Type: text/x-patch, Size: 346 bytes --]

--- 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.

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

             reply	other threads:[~2003-12-02 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-02 15:22 Stephen Compall [this message]
2003-12-19 19:18 ` [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS Kevin Ryde
2003-12-20 23:50   ` Stephen Compall
2003-12-21  0:17     ` Kevin Ryde
2004-02-14  0:17     ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xfyfzg31byd.fsf@csserver.evansville.edu \
    --to=s11@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).