C++ Logo

sg12

Advanced search

Re: [ub] new revision of p0593

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 9 Feb 2018 23:49:59 +0200
On 9 February 2018 at 23:20, David Vandevoorde <daveed_at_[hidden]> wrote:
> That looks really good to me. (I particularly like giving teeth to the pseudo-destructor calls.)


Those teeth have a possibly intriguing interaction with jumps into
scopes. Today, we don't allow such
jumps if they pass initialization of an object of a type that doesn't
have both trivial default constructor
and trivial destructor. I heard a suggestion to relax that destructor
rule, and pointed out that if the
destructor is non-trivial, there may have been a call to it before the
destination of the jump,
at which point things become.. ..funny. Then I pointed out that the
current rules ascertain that
even if you jump into a point where destruction should have happened,
there's no out-of-lifetime
access since a trivial destructor doesn't end lifetime. With these
teeth, it will, and I can jump
into zombie-land, or I can jump into what should've been zombie-land
but now isn't.
I don't know whether that's bad or whether these teeth are still an improvement,
just thought that it's worth considering.

Received on 2018-02-09 22:50:04