public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/114357] New: C++: Support the no_destroy attribute
@ 2024-03-15 21:48 i at maskray dot me
  2024-03-15 21:59 ` [Bug c++/114357] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: i at maskray dot me @ 2024-03-15 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

            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 variables 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 (seems
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).

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

end of thread, other threads:[~2024-03-16 10:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-15 21:48 [Bug c++/114357] New: C++: Support the no_destroy attribute i at maskray dot me
2024-03-15 21:59 ` [Bug c++/114357] " pinskia at gcc dot gnu.org
2024-03-15 22:02 ` [Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's " pinskia at gcc dot gnu.org
2024-03-15 22:08 ` jfb at chromium dot org
2024-03-15 22:09 ` pinskia at gcc dot gnu.org
2024-03-15 22:25 ` jfb at chromium dot org
2024-03-15 22:26 ` pinskia at gcc dot gnu.org
2024-03-15 23:46 ` redi at gcc dot gnu.org
2024-03-16 10:35 ` 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).