mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-19 22:33:13 +01:00
Fixed #28 — 64-bit unions are not the same size as C language unions in some situations
This commit is contained in:
@@ -233,13 +233,10 @@ void AggregateDeclaration::addField(Scope *sc, VarDeclaration *v)
|
||||
if (!isUnionDeclaration())
|
||||
sc->offset = ofs;
|
||||
#endif
|
||||
#if !IN_LLVM
|
||||
if (global.params.is64bit && sc->structalign == 8 && memalignsize == 16)
|
||||
if (global.params.is64bit && sc->structalign == 8 && memalignsize == 16 && isUnionDeclaration())
|
||||
/* Not sure how to handle this */
|
||||
;
|
||||
else
|
||||
#endif
|
||||
if (sc->structalign < memalignsize)
|
||||
else if (sc->structalign < memalignsize)
|
||||
memalignsize = sc->structalign;
|
||||
if (alignsize < memalignsize)
|
||||
alignsize = memalignsize;
|
||||
|
||||
Reference in New Issue
Block a user