Type ulong is 64-bit on 32-bit Linux, but has 32-bit alignment.
This affects the layout of bitfields.
Also add a new test for ImportC bitfields, which compares size,
alignment and layout with the host C++ compiler. The existing
tests compared with fixed values instead.
Get rid of obsolete `{C,Cpp}Runtime_DigitalMars` special cases
Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Issue 20339: isPOD returns true if sizeof is accessed inside struct declaration
Issue 24292: Struct with destructor wrongly returned in register
Function StructDeclaration.isPOD can be called before the semantic run
for the struct is finished. It then uses incomplete information about
destructors, postblits and copy constructors. The result of isPOD is
cached, so later calls will also return the wrong result.
This commit changes isPOD, so it uses variables, which are already
filled before the semantic run.