Liste des Groupes | Revenir à cl c |
David Brown <david.brown@hesbynett.no> wrote:That is probably a fair comment.On 30/11/2024 18:38, Bart wrote:You are exagerating and that does not help communication.It will at least work with more compiles.>
>
And why would that matter? No actual developer would care if their code
can be compiled by your little toy compiler, or even more complete
little tools like tcc. Code needs to work on the compilers that are
suitable for the job - compatibility with anything else would just be a
waste of effort and missing out on useful features that makes the code
better.
In thisWould that be the person who thinks that after armageddon we will all go back to using C90 on mainframes? I'm not sure that individual can be taken seriously.
group there were at least one serious poster claiming to write code
depending only on features from older C standard.
People like thisYes, but such compilers are not good tools for that purpose. tcc does not in any way attempt to spot deviations from any standard. As far as I can tell from its documentation, it supports C89/C90, "many features of the new C standard: ISO C99", some gcc extensions, and some of its own TinyCC extensions. And there is no flags for controlling these or setting "conforming" modes.
presumably would care if some "toy" compiler discoverd non-compliance.
Concerning tcc, they have explicit endorsment from gawk developer:Is that so that you can say I am wrong to claim "no one" cares about tcc support, because you have found 1 person who has used it? I admit it - "no one" was an exaggeration.
he likes compile speed and says that gawk compiles fine using tcc.
In may coding I use gcc extentions when I feel that there isSure - I think most of us do that.
substantial gain. But for significant part of my code I prefer
to portablility,
and that may include avoiding features notI think very few care about that bit. I'll use a gcc extension if it makes a noticeable improvement to the code - making the source code nicer in some way, improving static error checking, or improving the efficiency of the object code. But I certainly won't avoid a standard C feature just because some lesser compilers might not support it!
supported by lesser compilers.
I the past tcc was not ableUsing similar quality or better tools can be an aid. Maybe if you are not sure about something, you check with both gcc and clang instead of just one of them. When using weaker tools (for specific embedded targets), I have used gcc as a static error checker in parallel with the actual compiler.
to compile code which I consider rather ordinary C, and due
to this and lack of support for my main target I did not use
tcc. But tcc improved, ATM I do not know if it is good enough
for me, but it passed initial tests, so I have no reason to
disregard it.
BTW: IME "exotic" tools and targets help with finding bugs.
So even if you do not normally need to compile with some
compiler it makes sense to check if it works.
Les messages affichés proviennent d'usenet.