Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: _BitInt(N) Date: Thu, 27 Nov 2025 16:39:51 -0800 Organization: None to speak of Lines: 41 Message-ID: <87a507htwo.fsf@example.invalid> References: <10dajlh$ko3c$1@dont-email.me> <10g1et7$2bmus$1@dont-email.me> <10g1j7h$2deh9$1@dont-email.me> <10g1qq9$2f8lb$4@dont-email.me> <10g28gm$2mf9s$1@dont-email.me> <10g2f2d$2oufq$1@dont-email.me> <10g2m3v$2s5sa$1@dont-email.me> <10g53au$3onvh$1@dont-email.me> <10g58pa$3r273$1@dont-email.me> <10g6bpp$60nh$1@dont-email.me> <10g6qek$bfrp$1@dont-email.me> <10g742m$ev96$2@dont-email.me> <10g779l$h980$1@dont-email.me> <10g7aci$icq7$1@dont-email.me> <10g7hm2$lpsu$1@dont-email.me> <10g7oqf$ojir$1@dont-email.me> <10g7ue4$r47b$1@dont-email.me> <10g9a0r$1a895$1@dont-email.me> <10g9fmh$1crf0$1@dont-email.me> <87ecpjhvse.fsf@example.invalid> <10gapc8$1tj26$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 28 Nov 2025 00:39:52 +0000 (UTC) Injection-Info: dont-email.me; posting-host="9ea16e30e5b17edc262b0552d84c9a75"; logging-data="2011892"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pdYhq5QAvwsa9oSeARD8E" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:httBGSmfpZW0rsUWpkDY9pDJmjA= sha1:I3OZH20tyJddLq0Cli93aypc49Y= Xref: csiph.com comp.lang.c:395538 bart writes: > On 27/11/2025 23:59, Keith Thompson wrote: >> bart writes: >>> On 27/11/2025 10:43, David Brown wrote: >> [...] >>>> uint64_t get_exponent(double x) { >>>>     return ((union { double d; uint64_t u;}) { x }.u >> 52) >>>>              & ((1ull << (62 - 52 + 1)) - 1); >>>> } [...] >> How exactly did clang and msvs express their dislike? What versions >> are >> you using? >> On my systems, it works correctly with gcc 13.3.0, clang 18.1.3, >> tcc 0.9.27, Microsoft Visual Studio 2022 17.14.20. >> If your problem is that you're using older compilers that don't >> support >> compound literals, it would have saved some time if you had said so. Can you *please* do something about the way your newsreader (apparently Mozilla Thunderbird) mangles quoted text? That first quoted line, starting with "> How exactly", would have been just 74 columns, but your newsreader folded it, making it more difficult to read. It also deletes blank lines between paragraphs. I don't recall similar problems from other Thunderbird users. > I said in a followup that I'd been using a C++ compiler by mistake > (this was on Godbolt). > > That gcc's C++ compiler accepted the code wasn't helpful. But not surprising, since as you know gcc (and likewise g++) is not fully conforming by default. If you're compiling code with the purpose of making a point about the language, invoke the compiler in standard-conforming mode. And if a compiler "doesn't like" the code you feed it, at least show us the diagnostic messages. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */