https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- We do now have the analyzer and -Wuse-after-free. I don't think a rust-like borrow checking feature will ever work or is sensible to implement in C. Use rust if you need such a feature. I'm also not sure a "weaker" form of borrow checking is actually useful. That would leave "custom" alloc-free like attributes using the -Wuse-after-free or the corresponding analyzer diagnostics without any other semantic side-effects. Is that what you actually want?