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: Thu, 29 Jul 2021 10:29:49 -0700 Organization: None to speak of Lines: 36 Message-ID: <87eebhf2pe.fsf@nosuchdomain.example.com> References: <87sfzzgr72.fsf@nosuchdomain.example.com> <1mgMI.17475$6j.16299@fx04.iad> <87zgu6f367.fsf@nosuchdomain.example.com> <87v94tg8sw.fsf@nosuchdomain.example.com> <87mtq5f92k.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="f7dbd806dd1436700e4487cff600874e"; logging-data="18257"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XVysG3AxiftKwySKzx+6F" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:KsHCn/l+zP/wrxKCTjg40D9mvSE= sha1:+kX2kv+18lAkc3IDRLqxSMvm8l8= Xref: csiph.com comp.lang.c:162099 scott@slp53.sl.home (Scott Lurndal) writes: > Bart writes: >>On 29/07/2021 16:12, Keith Thompson wrote: >>> Bart writes: >>>> On 29/07/2021 03:20, Keith Thompson wrote: >>>>> Bart writes: >>> [...] >>>>>> Sure, I can do that (after fixing the code with the right includes and >>>>>> avoiding %zu). But that's the trial and error approach. >>>>> %zu is the correct format specifier. I'm not even going to ask why >>>>> you'd want to avoid it. >>>> >>>> I'll tell you anyway: it doesn't work on Windows. >>> >>> Yes, it does. I don't know why it wouldn't work for you. Are you using >>> some obsolete version of Windows or of its C implementation? >> >>It's Windows 7. gcc is version 9.2.0. >> >>This program: >> >> #include >> int main(void) {printf("%zu\n",sizeof(void*));} > > It has _always_ worked properly with GCC. You're clearly > either doing something incorrect if your assertion is accurate. [...] gcc doesn't implement printf. The C library does. Bart is using an obsolete version of Microsoft's C library. -- 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 */