[Bug analyzer/106390] Support gsl::owner<T> and/or [[gnu::owner]] attribute in -fanalyzer
vultkayn at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 8 19:44:30 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106390
--- Comment #5 from Benjamin Priour <vultkayn at gcc dot gnu.org> ---
> I agree that this would be a problem, but instead of implying that we need
> two attributes, I think this implies that we should not try to use
> [[gsl::owner]] for shared ownership. If you don't try to use it for both,
> the problem doesn't exist.
If we discard tracking shared ownership, it indeed removes a lot of complexity,
and I agree we can stick to [[gsl::owner]], and tracking moves of resources
becomes much simpler.
I'll go with that for now, see what tests I can do, dig a little bit.
More information about the Gcc-bugs
mailing list