A D2 source code containing the following snippet can be compiled under DMD 2.059
union Prefix {
char[9] data;
align(1) struct { uint fileno; uint lineno; char delim; };
}
static assert(Prefix.sizeof == 9);
and unfortunately fails under DMD 2.060 (Prefix.sizeof becomes equal to 12).
How can it be fixed?
This seems to do what you want:
align(1) union Prefix
{
ubyte[9] data;
struct
{
uint fileno;
uint lineno;
char delim;
}
}
static assert(Prefix.sizeof == 9);