https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #10 from uecker at gcc dot gnu.org ---
I would say it is rather likely that C will get something like this at some
point.
BTW: Any use of the pointer value after free as in comment #2 is UB.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #9 from Richard Biener ---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #8 from Eric Gallager ---
(In reply to Neal H. Walfield from comment #0)
> I would like an attribute to indicate that ownership of an argument is moved
> to the function. That is, any subsequent accesses to the variable should be
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #7 from Martin Sebor ---
(In reply to Jakub Jelinek from comment #2)
> Wouldn't that break e.g. programs that
> free (a);
> return (uintptr_t) a % 16;
> or similar (i.e. inspect the bits of the pointer rather than what it points
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
Eric Gallager changed:
What|Removed |Added
Keywords||diagnostic
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #5 from Marc Glisse ---
(In reply to rguent...@suse.de from comment #3)
> Indeed. So it would be
>
> *a = {CLOBBER};
>
> which is of course somewhat difficult since we do not know the size
> of the object pointed to.
One thing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #4 from Neal H. Walfield ---
I'm not sure what '*a = {CLOBBER};' does and I'm having trouble finding
documentation for it so the following comment might be unnecessary.
Nevertheless: when I say "move", I don't mean that the object
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #3 from rguenther at suse dot de ---
On Mon, 7 Jan 2019, jakub at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
>
> --- Comment #2 from Jakub Jelinek ---
> Wouldn't that break e.g. programs that
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
--- Comment #2 from Jakub Jelinek ---
Wouldn't that break e.g. programs that
free (a);
return (uintptr_t) a % 16;
or similar (i.e. inspect the bits of the pointer rather than what it points
to)?
That should be valid even after free, free
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
Richard Biener changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
Richard Biener changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88737
Jonathan Wakely changed:
What|Removed |Added
Severity|normal |enhancement
12 matches
Mail list logo