Hi,

So you're referring to the standards compliance level for tcc implemention 
itself?
That's a rather important question in this context, because there is a 
fundemental
tradeoff between the language feature set chosen for tcc implementation itself 
which
affects the bootstrapping of it.
(bootstrapping a C compiler is far more challenging than merely compiling it 
let's
say self-hosting or compiling it with gcc/clang)
Depends if you consider bootrapping tcc a relevant criteria, myself does.
Shall be no criticism at all, merely a proposal to keep bootstrapping criteria 
of and
with tcc in mind.

Currently, you may have a look at live-bootstrap project from bootstrappable.org
They had forked some tcc-0.9.26 version and patched it to be even more 
conservative
with language constructs that a much simpler C-compiler during the early stages
can process, then re-compile tcc/libc several times, it's rather complicated
already. And there has been a discussion before on tinycc-devel about this, 
which i
didn't follow at that time. Maybe someone else remembers to pick up this topic
with the necessary expertise and insight.

Few weeks ago i tried to transition this tcc-0.9.26 and tcc-0.9.27 to bootstrap
tcc-head directly instead from a compiler known as pnut-cc (some excellent 
project
from laurenth, too see codeberg.org/aggi/tiny-bootstrap if you wish, and the 
github repo
from laurenth, janneke, and a few other people) So far I only succeeded to swap
tcc-0.9.27 with tcc-head in this case, but do need the intermediate 
forked/patched
0.9.26 version still because it's a non-trivial task to rebase some changes from
janneke/0.9.26 onto tcc-head to make that "bootstrappable" directly again.
So far i did an extensive review with tiny-bootstrap and might help a little 
only too
coordinate this, if anyone wishes. To keep it brief, it would be a nice-to-have
if tcc-mob/HEAD could be bootstrapped/compiled with pnut-cc/mes-cc (and some 
other
mes-replacement project from a developer named Frans Faase, many people tried to
cleanup at this frontline including myself but noone succeeded yet to rebase for
tcc-head without several other intermediate steps and tcc/libc versions 
involved)

Long story short, there's a tradeoff between language-constructs chosen and
remaining bootstrappable. I think stikonas and janneke might explain in detail
tcc already is affected by some issues which blocks it at 0.9.26, tcc-head 
cannot
yet directly be re-integrated with the live-bootstrap procedure, besides some 
libc
issues.

Regards
Michael

On 2026-06-02 13:59, Mounir IDRASSI via Tinycc-devel wrote:
> Hi Meng,
> 
> To me, the current policy for tcc source is described in CodingStyle: tcc is 
> mostly implemented in C90, and new non-C90 constructs shouldn't be introduced 
> unless already used. The current "-Wdeclaration-after-statement" check helps 
> preserve that style while still leaving GCC/Clang in their normal GNU mode.
> 
> Replacing it with "-std=c99" would weaken that check because it permits mixed
> declarations and statements. It also changes the host compiler into strict ISO
> C mode, which affects system header visibility: the need to add 
> _DEFAULT_SOURCE
> for usleep in your patch is a symptom of that.
> 
> So I wouldn't replace "-Wdeclaration-after-statement" with "-std=c99" just
> because the CI passes. If there is a specific build issue with the current 
> flag,
> we should address that directly. If the goal is to check that tcc can also be
> built under a C99 host compiler mode, that could be considered as an optional
> CI and configuration test, but it shouldn't replace the current style check.
> 
> Regards,
> 
> Mounir IDRASSI
> 
> 
> 
> From: Meng Zhuo <[email protected]>
> To: <[email protected]>
> Date: Mon, 01 Jun 2026 18:06:11 +0900
> Subject: [Tinycc-devel] Changing std to C99?
> 
>  > Hi, everyone
>  > 
>  > I notice TinyCC should follow C99 instead of GNU99 according to 
>  > https://bellard.org/tcc , is it designed by that way or something that I 
>  > missed?
>  > 
>  > 
>  > I have tested C99 on my Github and all testes passed
>  > 
>  > https://github.com/mengzhuo/tinycc/actions/runs/26745551862
>  > 
>  > 
>  > _______________________________________________
>  > Tinycc-devel mailing list
>  > [email protected]
>  > https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>  > 
> 
> 
> 
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel

-- 

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to