guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS


From: Stephen Compall
Subject: Re: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS
Date: 20 Dec 2003 17:50:58 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Kevin Ryde <address@hidden> writes:

> Do you also get a warning from the prototypes for scm_c_define_subr
> and friends (out of libguile.h)?

I added -Wstrict-prototypes to the CFLAGS for my own package, not
Guile itself.  GCC, by default, does not produce warnings in system
headers (i.e. libguile.h & depends).  If those functions have such
parameter types, though, missing `void' where it should be, then you
would get warnings there while compiling Guile, I should think.

Then again, the warnings I turn on would probably complain all over
the place.

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

I believe this, however, would eliminate almost all the benefit of
type-checking of function pointers in the first place.

--
Stephen Compall or s11 or sirian

"But what we need to know is, do people want nasally-insertable computers?"

warfare Ft. Bragg Skipjack enforcers Medco SWAT Kennedy mania ARPA
kilo class encryption Watergate Defcon Project Monarch Ermes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]