[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-16 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-15 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 --- Comment #7 from Jonathan Wakely --- Libstdc++ has to use some sneaky hacks to avoid destroying globals, we would definitely use no_destroy if we had it.

[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-15 Thread jfb at chromium dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 --- Comment #5 from JF Bastien --- (In reply to Andrew Pinski from comment #4) > (In reply to JF Bastien from comment #3) > > The LLVM feature was added for XNU, because the kernel never runs its own > > global C++ destructors (but the compiler

[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 --- Comment #4 from Andrew Pinski --- (In reply to JF Bastien from comment #3) > The LLVM feature was added for XNU, because the kernel never runs its own > global C++ destructors (but the compiler can't know this). It saved a > non-trivial

[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-15 Thread jfb at chromium dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 --- Comment #3 from JF Bastien --- The LLVM feature was added for XNU, because the kernel never runs its own global C++ destructors (but the compiler can't know this). It saved a non-trivial amount of code generation.

[Bug c++/114357] Add a way to not call deconstructors for non-auto decls, like clang's no_destroy attribute

2024-03-15 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Summary|C++: