From: Keith.S.Thompson+u@gmail.com   
      
   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 */   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|