From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A91153858C27; Sun, 9 Apr 2023 19:59:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A91153858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681070367; bh=lL9f2h6v9JF8tHYXBI7mebEKQXKSkaz/EeBuTX1YZ58=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qPrw7SOQcy63vRT+S6ziU5/VJsopJZY3jKY49j1UuZgdJSi+mp/xXp9GmSyMy8T6U pbxgfCU24rOlzwxStPb6zZq5xQgDEsNT2dI0gOITvdU5rz2xAy1pDdEWVAk/sbZG2L BsYRy6zhtddiWxpHJnu58sPl8RUZV3mXyozU0VSw= From: "leni536 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102989] Implement C2x's n2763 (_BitInt) Date: Sun, 09 Apr 2023 19:59:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: leni536 at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102989 L=C3=A9n=C3=A1rd Szolnoki changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |leni536 at gmail dot com --- Comment #33 from L=C3=A9n=C3=A1rd Szolnoki -= -- (In reply to joseph@codesourcery.com from comment #32) > On Fri, 28 Oct 2022, jakub at gcc dot gnu.org via Gcc-bugs wrote: >=20 > > > That said, if C allows us to limit to 128bits then let's do that for = now. > > > 32bit targets will still see all the complication when we give that a= stab. > >=20 > > I'm afraid once we define BITINT_MAXWIDTH, it will become part of the A= BI, so > > we can't increase it afterwards. >=20 > I don't think it's part of the ABI; I think it's always OK to increase=20 > BITINT_MAXWIDTH, as long as the wider types don't need more alignment tha= n=20 > the previous choice of max_align_t. It's not part of the ABI until people put _BitInt(BITINT_MAXWIDTH) on ABI boundaries of their libraries. If a ridiculously large BITINT_MAXWIDTH does nothing more than discourages usages of _BitInt(BITINT_MAXWIDTH) in general, than that's already great. We don't need an other intmax. Also I don't want to think about the max N for _BitInt(N), similarly how I don't want to think about the max N for int[N]. There might be implementati= on limits, but it should be high enough so I don't have to think about those f= or everyday coding. > Thus, starting with a 128-bit limit (or indeed a 64-bit limit on 32-bit=20 > platforms, so that all the types fix within existing modes supported for= =20 > arithmetic), and adding support for wider _BitInt later, would be a=20 > reasonable thing to do. I disagree. > (You still have ABI considerations even with such a limit: apart from the= =20 > padding question, on x86_64 the ABI says _BitInt(128) is 64-bit aligned=20 > but __int128 is 128-bit aligned.) >=20 > > Anyway, I'm afraid we probably don't have enough time to implement this > > properly in stage1, so might need to target GCC 14 with it. Unless som= ebody > > spends on it > > the remaining 2 weeks full time. >=20 > I think https://gcc.gnu.org/pipermail/gcc/2022-October/239704.html is=20 > still current as a list of C2x language features likely not to make it=20 > into GCC 13. (I hope to get auto and constexpr done in the next two=20 > weeks, and the other C2x language features not on that list are done.)=