[Top][All Lists]

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


From: Stephen Compall
Subject: [PATCH]-Wstrict-prototypes on SCM_FUNC_CAST_ARBITRARY_ARGS
Date: 02 Dec 2003 15:22:34 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

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

Attachment: strict-protos.patch
Description: patch to libguile/snarf.h

reply via email to

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