tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TinyCC does not accept variable-length static qualifi


From: John Scott
Subject: Re: [Tinycc-devel] TinyCC does not accept variable-length static qualifier for function parameter arrays
Date: Mon, 28 Feb 2022 11:43:51 +0000

On Mon, 2022-02-28 at 09:25 +0100, david.koch@libertysurf.fr wrote:
> Gcc allows this, but Gcc is not conformant and creates "extensions" as it see 
> fit.
This is not a GCC extension; it's my understanding that this is pure
C99. N2310 [1] (a C17 draft) 6.7.6.3 says

A declaration of a parameter as "array of type" shall be adjusted to
"qualified pointer to type", where the type qualifiers (if any) are
those specified within the [ and ] of the array type derivation. If the
keyword static also appears within the [ and ] of the array type
derivation, then for each call to the function, the value of the
corresponding actual argument shall provide access to the first element
of an array with at least as many elements as specified by the size
expression.

Correct me if I'm wrong, but isn't argc+1 an expression?

[1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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