[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Re : Re: TinyCC does not accept variable-length static q
From: |
david . koch |
Subject: |
[Tinycc-devel] Re : Re: TinyCC does not accept variable-length static qualifier for function parameter arrays |
Date: |
Tue, 1 Mar 2022 17:36:29 +0100 (CET) |
As stated here : https://bellard.org/tcc/
"TCC is heading torward full ISOC99 compliance"
Hence it is recognized as not being fully compliant.
You might want to compare with LCC :
https://drh.github.io/lcc/
The Pelles C compiler is base upon :
http://www.smorgasbordet.com/pellesc/
Regards.
https://en.wikipedia.org/wiki/C99
----- Mail d'origine -----
De: Michael Matz <matz.tcc@frakked.de>
À: tinycc-devel@nongnu.org
Envoyé: Tue, 01 Mar 2022 15:55:08 +0100 (CET)
Objet: Re: [Tinycc-devel] TinyCC does not accept variable-length static
qualifier for function parameter arrays
Hello,
On Mon, 28 Feb 2022, John Scott wrote:
> 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?
You are correct, it's ISO C and tcc isn't conforming in rejecting this.
Patches welcome :-)
Ciao,
Michael.
>
> [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2310.pdf
>
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel