Sujet : Re: "span"
De : ben.usenet (at) *nospam* bsb.me.uk (Ben Bacarisse)
Groupes : comp.lang.cDate : 24. Mar 2024, 02:28:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87wmpsh0zy.fsf@bsb.me.uk>
References : 1 2 3 4 5
User-Agent : Gnus/5.13 (Gnus v5.13)
Keith Thompson <Keith.S.Thompson+
u@gmail.com> writes:
Thiago Adams <thiago.adams@gmail.com> writes:
Em 3/22/2024 9:19 PM, Ben Bacarisse escreveu:
Thiago Adams <thiago.adams@gmail.com> writes:
[...]
void f(int n, int a[n])
Although you can't rely on this anymore since it's now an optional
part of the language.
>
I think it is back in c23.
But not vlas.
[...]
>
Correct.
>
From N1570 (the last public draft before C11):
>
__STDC_NO_VLA__ The integer constant 1, intended to indicate that
the implementation does not support variable length arrays or
variably modified types.
>
From N3220 (the first public draft of C26, essentially equivalent to C23):
>
__STDC_NO_VLA__ The integer constant 1, intended to indicate that
the implementation does not support variable length arrays with
automatic storage duration. Parameters declared with variable
length array types are adjusted and then define objects of
automatic storage duration with pointer types. Thus, support for
such declarations is mandatory.
Has C23 been ratified yet? The fact that there's a draft of C26
suggests it has been, but the news passed me by.
-- Ben.