From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D97A0385843E; Fri, 15 Mar 2024 21:48:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D97A0385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710539282; bh=n8M3o/tBU/YKuU4iRZinXCfP/ilhpdGy9Q10Bg5pGaY=; h=From:To:Subject:Date:From; b=o1QVY6I14fE5ZIT1p17UEhctqwveHx0l4CsfVhYns6azVxOP3tbwNM8bZaPTljmzG Oryv1gK0h0rFhICJJHjAOiwz8fEivTJmO6ShgTuVC59GcZZ5C4VmkniRt/szZOTrAs cOuusA3eCFhkSne7XCYa1Iy6Nt0oWtgQGkUjKBXM= From: "i at maskray dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114357] New: C++: Support the no_destroy attribute Date: Fri, 15 Mar 2024 21:48:02 +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: i at maskray dot me 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=3D114357 Bug ID: 114357 Summary: C++: Support the no_destroy attribute Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: i at maskray dot me Target Milestone: --- Clang supports [[clang::no_destroy]] (alternative form: `__attribute__((no_destroy))`) to disable exit-time destructors of variable= s of static or thread local storage duration. * July 2018 discussion: https://discourse.llvm.org/t/rfc-suppress-c-static-destructor-registration/= 49128 * Patch: https://reviews.llvm.org/D50994 with follow-up https://reviews.llvm.org/D54344 * Current documentation: https://clang.llvm.org/docs/AttributeReference.html#no-destroy * https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1247r0.html (se= ems not presented to EWG yet) [[clang::always_destroy]] enables exit-time destructors for specific objects (when -fno-c++-static-destructors disables exit-time destructors globally).=