[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS
From: |
Kevin Ryde |
Subject: |
Re: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS |
Date: |
Sat, 20 Dec 2003 05:18:33 +1000 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
Stephen Compall <address@hidden> writes:
>
> 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.
Do you also get a warning from the prototypes for scm_c_define_subr
and friends (out of libguile.h)?
> 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.
I wonder why a cast is needed at all. I might have thought a
parameter "SCM (*)()" would be happly passed a function "SCM foo (SCM
x, SCM y)" or whatever.