public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/104388] New: Request: A builtin to mark an object as invalid @ 2022-02-04 18:44 Darrell.Wright at gmail dot com 2022-02-04 22:14 ` [Bug c++/104388] " pinskia at gcc dot gnu.org 2022-02-07 7:45 ` rguenth at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: Darrell.Wright at gmail dot com @ 2022-02-04 18:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104388 Bug ID: 104388 Summary: Request: A builtin to mark an object as invalid Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Darrell.Wright at gmail dot com Target Milestone: --- Would it be possible to get a builtin that marks an object as invalid until it is overwritten and make it IF if the object is used other than destruction, assignment or taking its address/ref. I am naive on the compiler internals here, but this could allow for the safety of destructive moves without the changes to the object model around destruction ordering. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/104388] Request: A builtin to mark an object as invalid 2022-02-04 18:44 [Bug c++/104388] New: Request: A builtin to mark an object as invalid Darrell.Wright at gmail dot com @ 2022-02-04 22:14 ` pinskia at gcc dot gnu.org 2022-02-07 7:45 ` rguenth at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-02-04 22:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104388 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/104388] Request: A builtin to mark an object as invalid 2022-02-04 18:44 [Bug c++/104388] New: Request: A builtin to mark an object as invalid Darrell.Wright at gmail dot com 2022-02-04 22:14 ` [Bug c++/104388] " pinskia at gcc dot gnu.org @ 2022-02-07 7:45 ` rguenth at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: rguenth at gcc dot gnu.org @ 2022-02-07 7:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104388 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING Last reconfirmed| |2022-02-07 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC internally places "clobbers" to mark object contents as invalid (as you name it) and then can diagnose uses (but as "uninitialized") and can do optimizations like remove dead stores into the now invalid object. Those could be exposed as builtin. Can you provide an example testcase how you'd use the builtin? ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-07 7:45 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-02-04 18:44 [Bug c++/104388] New: Request: A builtin to mark an object as invalid Darrell.Wright at gmail dot com 2022-02-04 22:14 ` [Bug c++/104388] " pinskia at gcc dot gnu.org 2022-02-07 7:45 ` rguenth 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).