Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Why does C allow structs to have a tag? Date: Tue, 10 Aug 2021 14:00:54 -0700 Organization: None to speak of Lines: 92 Message-ID: <87tujxui9l.fsf@nosuchdomain.example.com> References: <87czqnlp2m.fsf@bsb.me.uk> <877dgvljpf.fsf@bsb.me.uk> <2a1b4347-595a-469a-8df1-db64af9896acn@googlegroups.com> <94f47c65-5f5f-44d1-bc37-d51155624ae5n@googlegroups.com> <87y29afah5.fsf@nosuchdomain.example.com> <1617a372-38e2-4729-a058-8f1ca95d5a49n@googlegroups.com> <87im0df9l9.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="4ba2c969ae0e906c6600fce7cdb6f53e"; logging-data="12658"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wC2NqfeyTdgphtvzv/1+m" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:7P0EaCq3X1GSV1sB1RMjfyJrBWk= sha1:iyJRan83rMyjFqnZZzFV1gBbWNE= Xref: csiph.com comp.lang.c:162298 Bart writes: > On 10/08/2021 19:17, Keith Thompson wrote: >> Bart writes: >> [...] >>> According to Keith, every C implementation consists of assorted >>> components like this: >>> >>> * Possibly, a discrete preprocessor >>> * Compiler >>> * Standard headers >>> * Assembler >>> * Linker >>> * Standard library >>> * Extensions >>> >>> which everyone who ever installs an implementation is expected to >>> obtain from different sources and mix and match to create a custom C >>> system. >> That is a lie. I did not say that. > > You said something like that 5 minutes later: > > KT: >> You use TDM-GCC. Yes, it's a "whole package" by the time you download >> it, but it was assembled from independent components. I did not say or imply that "everyone who ever installs an implementation" is required to assemble the components. TDM-GCC is assembled by the maintainers of TDM-GCC. The end user installs it as a single package. > Here's another post: > > On 31/07/2021 20:58, Keith Thompson wrote: >> "cc" is as driver program that might invoke several different programs, >> including a preprocessor, a compiler, an assembler, and a linker. It >> was perfectly reasonable for K&R Yes. I said nothing about the end user mixing and matching those programs. > And another: > > On 31/07/2021 05:14, Keith Thompson wrote: >> You very commonly gloss over the distinction between an*implementation* >> and a*compiler*. An implementation consists of several components; the >> compiler is just one of them. > > Even if someone doesn't create their own bundle, you imply that they > need to be aware of exactly what it comprises. You lied when you claimed that I said that the end user must obtain the components from different sources and mix and match them. I never said or implied that. The mixing and matching is usually done by package maintainers. And yes, sometimes the components of a given implementation are developed together and perhaps not intended to be used with other components. It can be very useful to understand that an implementation is made up of components, and which components make up the implementation you're using. For example, such an understanding can prevent someone from complaining that gcc doesn't implement printf correctly. > (As though I would have any clue as to what is what: I have two gcc > installations; tdm/gcc is 4900 files/215 directories/560MB; the other > is DFS's mingw64, 4850 files/195 directories/850MB. > > Clang is part of an LLVM download which is 370 files/34 > directories/1730MB, but I believe it still requires MSVC or MSBUILD > tools (I get those confused) for certain parts. I think that MS > product is 12300 files/1330 directories/2550MB. > > My own product is 1 file/1 directory/1MB (0 directories really as you > can stick the exe where you want); this one I do have a clue about!) I accept that you have a clue about all this. I think you understand it perfectly well. The mystery is why you pretend not to and get angry when someone points it out. If your own product combines all the elements of a C implementation into a siungle executable file, that's fine. It's an unusual approach, but I suppose there's no particular reason not to do it that way. I presume from context that this single executable file includes the code that implements printf rather than generating calls to an external library. If not, it's not a complete C implementation (which would also be just fine). -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */