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: Fri, 30 Jul 2021 16:36:48 -0700 Organization: None to speak of Lines: 71 Message-ID: <87wnp7bchb.fsf@nosuchdomain.example.com> References: <1mgMI.17475$6j.16299@fx04.iad> <87zgu6f367.fsf@nosuchdomain.example.com> <87v94tg8sw.fsf@nosuchdomain.example.com> <87mtq5f92k.fsf@nosuchdomain.example.com> <20210730075445.167@kylheku.com> <878s1neknd.fsf@nosuchdomain.example.com> <875ywrctxg.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="61d113eba2ad0840c9cee617d249c5be"; logging-data="17983"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+iM34HgIY4gV+OMMLlVhqH" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:aWlmTZcs60U5ap1IYyr3RFrZMdo= sha1:TVYi0V1PPA2zJV7QMLLCON+RVPk= Xref: csiph.com comp.lang.c:162153 Bart writes: > On 30/07/2021 23:34, Keith Thompson wrote: >> Bart writes: >> [...] >>> For the record, my current 'gcc' that I use on plain Windows is this >>> product: >>> >>> https://jmeubank.github.io/tdm-gcc/download/ >> https://jmeubank.github.io/tdm-gcc/about/ : >> TDM-GCC is a compiler suite for Windows. >> It combines the most recent stable release of the GCC compiler, >> a >> few patches for Windows-friendliness, and the free and open-source >> MinGW.org or MinGW-w64 runtime APIs, to create a more lightweight >> open-source alternative to Microsoft’s compiler and platform SDK. >> TDM-GCC is not a compiler. >> TDM-GCC is not gcc. >> TDM-GCC is not produced or maintained by the gcc project. >> TDM-GCC is a software package that combines a compiler (gcc) and >> other >> components (MinGW runtime libraries, probably other things) into a C >> implementation. >> Other software packages might combine the gcc compiler with other >> runtime library implementations. For example, there are packages that >> combine the gcc compiler with Microsoft's runtime library. >> If any of the above is inaccurate, Bart, I encourage you to correct >> me. >> You seem to imply that TDM-GCC gives you an implementation that by >> default uses the obsolete MSVCRT.DLL, and therefore does not support >> "%zu". I find that at least mildly surprising. I might install it >> myself over the weekend to see what's going on. > > C:\c>type c.c > #include > int main(void) { > printf("Hello, World! %zu\n",sizeof(void*)); > } > > C:\c>gcc --version > gcc (tdm64-1) 9.2.0 > > > C:\c>gcc c.c > > C:\c>a > Hello, World! zu > > C:\c>gcc c.c -lucrt > > C:\c>a > Hello, World! 8 > > C:\c>gcc c.c \tdm\x86_64-w64-mingw32\lib\libmsvcrt.a > > C:\c>a > Hello, World! zu > > C:\c> OK, that demonstrates that TDM-GCC by default does not support "%zu". It doesn't directly demonstrate that it uses MSVCRT.DLL, but that's probably the most likely explanation. Did you want to reply to anything else I wrote? Should I assume that you agree with the points I made above? (I would greatly appreciate a direct reply to that last question.) -- 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 */