free(3) const void *
DJ Delorie
dj@redhat.com
Fri Jan 26 21:47:38 GMT 2024
Andreas Schwab <schwab@linux-m68k.org> writes:
> Also, objects in the heap are never read-only.
I thought of that, but using "const" in a program can mean something
other than "the object is read-only". It can also act as a promise to
the user and/or optimizer that an object is not written to, even if
doing such is possible.
So the original problem of "having to keep a non-const pointer around
just to free it" is valid. My post was just to put me in the "too bad,
deal with it" category ;-)
More information about the Libc-alpha
mailing list