public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100805] New: __int128 should be disabled for non-extended -std= options
@ 2021-05-27 20:39 dje at gcc dot gnu.org
  2021-05-27 21:36 ` [Bug c++/100805] " schwab@linux-m68k.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dje at gcc dot gnu.org @ 2021-05-27 20:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100805

            Bug ID: 100805
           Summary: __int128 should be disabled for non-extended -std=
                    options
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dje at gcc dot gnu.org
  Target Milestone: ---

The __int128 extended type should not be enabled in strict standard mode, e.g.,
not gnu extended standard.

auto typechk = 0 ? 9223372036854775808 : -1;
unsigned long &typechk_p = &typeck;

64 bit mode:
error: cannot convert `__int128*' to `long unsigned int*' in initialization

32 bit mode:
error: invalid conversion from `long long int*' to `long long unsigned int*'
[-fpermissive]

using a signed type that is too small to preserve the value.

It seems that promoting the value to a type that is an extension is incorrect
in strict standard mode.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-08 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 20:39 [Bug c++/100805] New: __int128 should be disabled for non-extended -std= options dje at gcc dot gnu.org
2021-05-27 21:36 ` [Bug c++/100805] " schwab@linux-m68k.org
2021-05-27 22:32 ` harald at gigawatt dot nl
2021-05-28 16:38 ` redi at gcc dot gnu.org
2023-08-08 10:19 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).