From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D07E3858C42; Wed, 21 Feb 2024 11:33:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D07E3858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708515202; bh=VGekJV11llos5sjWBU3ZUixbvcwjgAh6bzJo7sawfO4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AStQoS6KBgoK74Qc3JMtcYi2sLPI12NKkurCzyvg3m+1Sk2W7XdAvS/EISNAQBitq rtDdI19wK6DwmGyMl6io933z6/koz0MolUTZjVpIh985nbr0nUkhczHCzIgeUi7PIJ 2wzrDDL6Npa9b5QHR0U1nvIWWt5ENKXmQ7Cdd/+U= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113450] [14 Regression] std/format/functions/format.cc FAILs Date: Wed, 21 Feb 2024 11:33:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D113450 --- Comment #15 from Jonathan Wakely --- (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #14) > Further research has uncovered some interesting facts: >=20 > * Neither the SysV SPARC psABI (3rd Edition, 1996) nor the original i386 > psABI (4th Edition, 1997) specify int8_t at all. Actually no wonder > because both predate C99. >=20 > However, even the current Intel386 psABI 1.1 (2015) has nothing here, > nor does the AMD64 psABI 1.0 (2024). >=20 > To my astonishment however, the SPARC Compliance Definition 2.4.1 > (1999), defacto if not in name the SPARC V9 psABI, lists in Figure > 6-140: , p.6P-13: >=20 > typedef signed char int8_t; >=20 > So it seems at least Solaris/SPARCV9 violates its own ABI ;-( Ouch! > * When checking clang, there were more surprises: >=20 > #define __INT8_TYPE__ signed char >=20 > With very few exceptions, clang uses the default definitions of the > intN_t types everywhere. That's interesting. I think GCC defines those __INTn_TYPE__ macros after inspecting the target headers (assuming the target provides or ) to ensure they agree. I wonder if Clang intentionally deviated from the Solaris headers to "fix" this issue, or if they just define __INT8_TYPE__ to signed char for all 8-bit targets because "obviously" that= 's correct for all targets (even though it isn't actually correct for Solaris). That means GCC and Clang will disagree about the mangling of a C++ function like void foo(int8_t); > However, the question remains how much that counts: given clang/llvm > has seen years of neglect on Solaris, I wonder how much actual code is > really built with it on Solaris. >=20 > * The Oracle Studio 12.6 cc has no definition of __INT8_TYPE__ at all > AFAICT. If that's true, one could change the type's definition simply > by adjusting , which would be nice and easy. I think those macros are a GCC thing not required by any standard. Oracle Studio can just rely on being present, because they know that's = true for Solaris. GCC can't (or couldn't historically) rely on being present for all targets so needed some other way to make those types availa= ble. Thanks for digging into this!=