[ub] Aliasing char16_t with int_least16_t, etc.
Lawrence Crowl
Lawrence at Crowl.org
Mon Nov 4 05:10:08 CET 2013
On 11/3/13, Jeffrey Yasskin <jyasskin at google.com> wrote:
> On Wed, Oct 30, 2013 at 3:06 PM, Lawrence Crowl <Lawrence at crowl.org> wrote:
>> Even further, we consider saying that we can access any integral type
>> with the same size and alignment.
>
> And a further generalization would be to say that we can alias any
> layout-compatible types, and then broaden "layout-compatible" to cover
> the integral cases we care about. Layout-compatible types can already
> be aliased through unions, but only when they're actually accessed
> through unions. This could provide the language side of
> http://cplusplus.github.io/LWG/lwg-active.html#2335.
>
> Thoughts?
Seems reasonable to me, but I do worried that we'll get too carried
away and unnecessarily inhibit the optimizer.
--
Lawrence Crowl
More information about the ub
mailing list