[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnutls-dev] Starting Guile integration
From: |
Simon Josefsson |
Subject: |
Re: [gnutls-dev] Starting Guile integration |
Date: |
Fri, 08 Jun 2007 13:41:50 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.95 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> Simon Josefsson <address@hidden> writes:
>
>> address@hidden (Ludovic Courtès) writes:
>
>>> That's because Guile contains this declaration:
>>>
>>> SCM scm_c_define_subr (const char *name, long type, SCM (*fcn)());
>>>
>>> This function allows C code to bind C function FCN to the Scheme level
>>> under NAME. It makes perfect sense to have FCN declared this way,
>>> because FCN can have any number of arguments (its number of required,
>>> optional and "rest" arguments are specified as part of TYPE).
>>>
>>> I can't think of a better way to declare FCN. Requiring users to cast
>>> their functions to, e.g., `SCM (* fcn) (void)', is not an option. At
>>> any rate, should a fix be found for Guile, it won't be available until
>>> the next Guile release.
>>
>> I can't think of a better solution right now. Still, do the warnings
>> cause any real harm? I'd rather not drop -Wstrict-prototypes if the
>> advantage of doing so would be to just hide some warnings.
>
> No, the warnings don't cause any harm by themselves, but it's annoying
> to get warnings for things that are intentional and harmless.
I think that either there actually are some cases were this usage will
cause problems (perhaps for '...' function prototypes? Or perhaps the C
standard regards something in this as undefined, possibly function
pointers aren't type-compatible in general), or GCC should not have a
warning mechanism for it. I'm leaning towards that there actually may
be some platform where this could cause problems, and that was what
prompted GCC to add this warning flag.
>> Did you try changing the order of -Wno-strict-prototypes to see if you
>> really can't negate the effect of the other parameter?
>
> No I didn't, but it wouldn't be convenient. Currently,
> `guile/src/Makefile.am' adds `-Wno-strict-prototypes' to the
> `libxxx_CFLAGS' but those are appended to `CFLAGS' rather than
> prepended.
>
> I'll try to see if I can hack around something else but I'm not very
> hopeful...
I noticed you found a way. Great!
/Simon
Re: [gnutls-dev] Starting Guile integration, Andrew W. Nosenko, 2007/06/01
Re: [gnutls-dev] Starting Guile integration, Ludovic Courtès, 2007/06/06