From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE7F73858CDB; Sat, 8 Oct 2022 22:28:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE7F73858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665268106; bh=yEj7KnD03B8C0EqSyGYaWF1laLoHoojU1sbVOR1NAAE=; h=From:To:Subject:Date:From; b=O5o19LqFM7qNPBSOoY3uctkFyL3ehBUpgEFipLVYnR+DzbyztB/uFh3vMMJDuEUUF 0qb0WlUSkbaUCXxkswIbG1XZdGqyQ0Q7nv6m8GJxkOqMCFbn8IlxJ+Xm8zr+/nVyKG UfaqsyjzcEYMWv1xlg7k4oNSHqRjL40zoMBcuL1o= From: "nikolasklauser at berlin dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107187] New: [feature request] Add `trivial_abi` attribute Date: Sat, 08 Oct 2022 22:28:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nikolasklauser at berlin dot de X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107187 Bug ID: 107187 Summary: [feature request] Add `trivial_abi` attribute Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nikolasklauser at berlin dot de Target Milestone: --- This attribute is implemented by clang. It changes the calling convention of non-trivial class types to be trivial for the purpose of calls (with some caveats). libc++ has used it in the unstable ABI for some time now, and we'd like to use it for new types in the stable ABI too, since it can improve performance dramatically. I'm sure libstdc++ (and other libraries) will fin= d it useful too. See https://quuxplusone.github.io/blog/2018/05/02/trivial-abi-101/ for a mo= re detailed explanation of it's benefits and drawbacks and https://clang.llvm.org/docs/AttributeReference.html#trivial-abi for the cla= ng documentation.=