Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #395538

Re: _BitInt(N)

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: _BitInt(N)
Date 2025-11-27 16:39 -0800
Organization None to speak of
Message-ID <87a507htwo.fsf@example.invalid> (permalink)
References (16 earlier) <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>

Show all headers | View raw


bart <bc@freeuk.com> writes:
> On 27/11/2025 23:59, Keith Thompson wrote:
>> bart <bc@freeuk.com> 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 */

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

#394650 
  #394657 
    #394658 
      #394659 
        #394662 
  #395383 
    #395386 
      #395387 
        #395388 
          #395400 
            #395401 
              #395412 
              #395417 
                #395447 
                #395458 
                #395573 
                #395603 
                #395614 
            #395411 
              #395414 
              #395418 
          #395575 
            #395582 
            #395587 
              #395597 
              #395600 
              #395604 
        #395390 
        #395395 
          #395396 
            #395402 
              #395403 
                #395419 
              #395408 
                #395415 
                #395421 
                #395445 
                #395422 
                #395428 
                #395434 
                #395436 
                #395451 
                #395478 
                #395484 
                #395485 
                #395486 
                #395487 
                #395492 
                #395495 
                #395498 
                #395488 
                #395578 
                #395591 
                #395489 
                #395494 
                #395501 
                #395502 
                #395503 
                #395505 
                #395506 
                #395507 
                #395513 
                #395524 
                #395526 
                #395522 
                #395523 
                #395525 
                #395527 
                #395534 
                #395535 
                #395544 
                #395546 
                #395547 
                #395549 
                #395551 
                #395571 
                #395560 
                #395572 
                #395554 
                #395557 
                #395530 
                #395531 
                #395532 
                #395541 
                #395548 
                #395550 
                #395558 
                #395559 
                #395563 
                #395564 
                #395565 
                #395567 
                #395568 
                #395570 
                #395569 
                #395584 
                #395592 
                #395865 
                #395867 
                #395877 
                #395880 
                #395889 
                #396255 
                #395869 
                #396249 
                #395870 
                #396248 
                #395871 
                #395876 
                #395561 
                #395562 
                #395566 
                #395552 
                #395545 
                #395555 
                #395556 
                #395536 
                #395537 
                #395538 
                #395539 
                #395542 
                #395683 
                #395540 
                #395628 
                #395630 
                #395640 
                #395645 
                #395649 
                #395650 
                #395655 
                #395662 
                #395664 
                #395666 
                #395667 
                #395821 
                #395826 
                #395874 
                #395651 
                #395653 
                #395656 
                #395657 
                #395654 
                #395658 
                #395659 
                #395660 
                #395520 
                #395510 
                #395511 
                #395515 
                #395574 
                #395581 
                #395585 
                #395589 
                #395593 
                #395609 
                #395616 
                #395617 
                #395619 
                #395620 
                #395623 
                #395633 
                #395634 
                #395637 
                #395638 
                #395641 
                #395647 
                #395648 
                #395642 
                #395644 
                #395646 
                #395625 
                #395626 
                #395629 
                #395636 
                #395639 
                #395643 
                #395661 
                #395665 
                #395668 
                #395669 
                #395817 
                #395818 
                #395622 
                #395594 
                #395601 
                #395602 
                #395605 
                #395608 
                #395611 
                #395607 
                #395450 
                #395460 
                #395461 
                #395464 
                #395471 
                #395475 
                #395490 
                #395497 
                #395499 
                #395491 
                #395512 
                #395819 
                #395480 
                #395483 
                #395493 
                #395500 
                #395496 
                #395481 
                #395508 
                #395509 
                #395514 
                #395576 
                #395580 
                #395583 
                #395586 
                #395599 
                #395595 
                #395598 
                #395610 
                #395612 
                #395613 
                #395615 
                #395618 
                #395621 
                #395624 
                #395627 
                #395631 
                #395632 
                #395635 
                #395606 
            #395406 
            #395407 
        #395399 
          #395404 
            #395405 
              #395410 
                #395413 
                #395423 
            #395416 
              #395420 
                #395430 
                #395446 
                #395452 
                #395577 
                #395588 
                #395596 
          #395409 
            #395426 

csiph-web