D-Programming-Language/dmd — pull request #2396 by yebblies (2013-07-28 13:47:49+00:00)
Title: [DDMD] Align first offset of derived class correctly (matching C++)

For whatever reason, in C++ the base class is padded by the base class' alignment.

eg:
```d
class A
{
long x;
int a;
}
class B : A
{
int b;
long c;
}
```
A needs 8-byte alignment, but consumes 12 bytes. B then starts at offset 12, when the C++ version would start at offset 16.

This is needed because `extern(C++)` classes (coming soon) need to match the alignment of the host C++ compiler.