Deutsch English Français Italiano |
<v60nuc$1k2n3$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: tcc - first impression. Was: Baby X is bor nagain Date: Tue, 2 Jul 2024 12:22:53 +0100 Organization: A noiseless patient Spider Lines: 70 Message-ID: <v60nuc$1k2n3$1@dont-email.me> References: <v494f9$von8$1@dont-email.me> <v53lf7$34huc$1@dont-email.me> <v53vh6$368vf$1@dont-email.me> <v54se1$3bqsk$1@dont-email.me> <20240624160941.0000646a@yahoo.com> <v5bu5r$va3a$1@dont-email.me> <20240624181006.00003b94@yahoo.com> <v5c86d$11ac7$1@dont-email.me> <JEheO.108086$ED9b.74955@fx11.iad> <v5cblg$11q0j$1@dont-email.me> <gEieO.108089$ED9b.25598@fx11.iad> <20240625113616.000075e0@yahoo.com> <mUzeO.141609$Cqra.55051@fx10.iad> <v5elql$1jmii$1@dont-email.me> <m3BeO.24907$Gurd.16179@fx34.iad> <v5empd$1jndv$2@dont-email.me> <v5eph4$1k6a9$1@dont-email.me> <87ed8jnbmf.fsf@bsb.me.uk> <v5jhls$2m7np$1@dont-email.me> <867ceadtih.fsf@linuxsc.com> <20240701200924.00003d9a@yahoo.com> <87zfr0wzpt.fsf@nosuchdomain.example.com> <20240702115448.00002025@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 02 Jul 2024 13:22:53 +0200 (CEST) Injection-Info: dont-email.me; posting-host="f5eb376a7ecc516b435e939f34e6f93c"; logging-data="1706723"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19165a63NieAhL4FhgtXKbN" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:vK2docXkE7D0GfHGoFqFGyW63K4= Content-Language: en-GB In-Reply-To: <20240702115448.00002025@yahoo.com> Bytes: 4383 On 02/07/2024 09:54, Michael S wrote: > On Mon, 01 Jul 2024 14:48:30 -0700 > Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: > >> 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. >> > > I think, bart said that tcc is self-contained. I interpreted is like > containing C RTL. Obviously, my interpretation of bart's statement was > wrong and in reality tcc relies on external RTL. Tcc is partly self-contained in that it turns .c files into binaries (.exe and .dll) without any external tools. tcc itself exists as either one .exe file or .exe/.dll (to allow embedding). It also has a set of system headers. Plus it has some .a libraries. About 100 files altogether. My older 'bcc' compiler was a lot more self-contained in that a single ..exe could generate .exe/.dll, and included its system headers. One file altogether (the newer 'mcc' is 2-3 files; it uses a discrete assembler, and windows.h is a separate file). Both make use of msvcrt.dll. I don't consider it a dependency since it has always been part of Windows. (I first starting using it in 1990s, from my other language, before I knew much about C, as it had a simpler file API than Windows.) Lots of other applications use it too. Including older gcc binaries and applications compiled with those. On Windows 11, probably 10 too, msvcrt.dll's printf routines support %zu, and so does Tcc. >> tcc is not advertised to support C17. According to >> <https://bellard.org/tcc/>, "TCC is heading torward full ISOC99 >> compliance." >> > > I didn't say that they advertise C17. However in practice they do > support few C11/C17 features. So why not _Alignof() ? > Considering that tcc already supports old Gnu __alignof__ extension, > adding support for _Alignof() would be very easy for them. _Generics is a very easy feature to implement (I did it in about 40 lines). Probably tcc could have it too with little trouble. Maybe somebody thought they should stick to C99 compliance rather than pick and choose the easier features of later standards.