gnutls-devel
[Top][All Lists]
Advanced

[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 15:55:39 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.95 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi,
>
> Simon Josefsson <address@hidden> writes:
>
>> 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.
>
> No no no.  From ISO/IEC 9899:1999 (aka. C99), Section 6.7.5.3,
> Paragraph 14:
>
>   The empty list in a function declarator that is not part of a
>   definition of that function specifies that no information about the
>   number or types of the parameters is supplied.124)
>
> In other words, if F is declared as "extern int f ();", then it may
> rightfully be passed any number of arguments.
>
> This mechanism is different from the ellipsis though (Paragraph 9): such
> functions are not treated differently from functions with full
> prototypes; therefore, the "regular" calling conventions are used when
> invoking them rather than that of variadic functions.

Ah, I see.  Thanks for the pointer.

> That said, this feature is reminiscent from older revisions of the
> standard and Footnote 124 reads:
>
>   The use of function declarators with empty parentheses (not
>   prototype-format parameter type declarators) is an obsolescent
>   feature.
>
> Thus, in the longer term, Guile will probably have to avoid it.

Yup.

/Simon



reply via email to

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