https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103827

--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #14)
> Note that this is the same for non-parameter local variables

Just want to emphasize this point: this property is in no way specific to
parameters, it applies to any object created as const.  If someone wants to use
a pointer that previously pointed to a const object to refer to a new const
object at the same address, they need to use std::launder to make the compiler
forget about the old object.

Reply via email to