Sujet : Re: tcc - first impression. Was: Baby X is bor nagain
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 01. Jul 2024, 22:48:30
Autres entêtes
Organisation : None to speak of
Message-ID : <87zfr0wzpt.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13)
Michael S <
already5chosen@yahoo.com> writes:
[...]
I tried tcc too.
>
1. It is easy to download. It does not need installation apart from
unzip.
So you're on Windows.
[...]
4. In this particular project I encountered few inconvenient
incompatibilities:
4.1. no support for %zd and %zu. May be, Linux version is better in that
regard?
%zd and %zu are supported by the runtime library, not by the compiler.
It's likely that tcc is configured to use something like msvcrt.dll,
which typically doesn't support C99 features.
4.2. Code like below does not compile. I don't know whether it is legal
'C' or not,
but gcc, clang and MSVC compilers accept it o.k.
label:int bar;
That's a syntax error in versions of C up to and including C17. C23
allows labels on declarations.
(Incidentally, the N3220 draft says that labels can be applied to either
statements or declarations, but the grammar doesn't seem to reflect
that.)
4.3. c11/c17 things that are supported even by MSVC, which is generally
does not claim full C11 support:
_Alignof()
>
It's close to advertised, i.e. it is not C17, but has few features of
C17.
tcc is not advertised to support C17. According to
<
https://bellard.org/tcc/>, "TCC is heading torward full ISOC99
compliance."
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */