December 05, 2015
On Saturday, 5 December 2015 at 04:34:03 UTC, Steven Schveighoffer wrote:
> I think what Vladimir is referring to is an align(1) struct:
>
> struct Foo
> {
>    align(1):
>    ubyte a;
>    int b;
> }
>
> Foo foo;
> int *ptr = &foo.b; // not pointing at aligned integer
>
> I think we should identify that tagged* does not support such pointers, and probably the ctor should assert this situation isn't occurring.
>
> -Steve

Yeah that is unsafe. What will happen is very architecture dependent to boot, even if you don't use the bitfield thing. That should probably not be safe.

1 2 3 4
Next ›   Last »