> On 27 Sep 2026, at 10:53, Christopher Bazley <[email protected]> > wrote: > > Hi, > > I think it's beneficial for the C programming language to have many > different front-ends: if taken into consideration by the C standard > committee, their good health should prevent the complexity of the > language from growing until it becomes impossible for all but the > biggest implementations to keep up with. If we end up in a situation > where it is impractical to implement a C2Y frontend in a compiler such > as TCC then I think that would be a great pity. The world already has > a C-like language that is prohibitively complex to implement: it's > called C++. I also question whether one could accurately describe TCC > as a C compiler under circumstances where it merely compiles the > output from another compiler. > > A long time ago, people used to question whether C++ was a real > language in its own right, given the fact that the first C++ compiler > was a translator (called Cfront). I expect the same attitude to > develop towards C23 and C2Y, if development of language frontends for > smaller compilers such as TCC is allowed to stagnate. > > Instead of arguing in abstract terms about whether TCC should compile > C99, C11 or C23, I'd find it more enlightening to see a discussion of > which specific language features are thought to be too onerous to > implement, too complex to parse efficiently, or both (and more > importantly, why). That information could then be fed back to the C > standard committee.
I don't know TCC's codebase, but my guess is that constexpr would be one of the worst features to implement, because in the past, constant expressions were limited to integers. Supporting objects like structs would probably require a significant refactoring of the front end. The other feature I believe would require a big refactoring is attributes. It's not a difficult feature, but it would generate a lot of diffs to review and implement. C23 enuns also requires a big review.. _BitInt(N) maybe can use some bit-fields infrastructure already existent. I like the idea of C compilers also being simple "machines" for generating code. The important features in this scenario are the ones that change the way code is generated. Thiago _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
