Subject: Re: [boost] [beast] Formal review
From: Peter Dimov (lists_at_[hidden])
Date: 2017-07-12 16:50:14
Groke, Paul wrote:
> > No, the problem with this code is (realistically speaking) not aliasing,
> > it's object lifetime. I don't think that any compiler is so strict as to
> > break it though; not yet, and maybe not ever.
> Isn't that kind-of the same thing?
Kind of. The undefined-ness comes from two separate places in the standard,
so it's not the same in theory. And it's not the same in practice in general
(although not here) because we don't want accesses to our fake size_t to
alias everything in the universe, as this would cause spills and reloads and
would defeat the optimization.