From 598942bd787d2cfc1e181857474fdf7a6fb10bc3 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Tue, 6 Mar 2012 11:29:30 +0400 Subject: [PATCH] =?UTF-8?q?Fixed=20#28=20=E2=80=94=2064-bit=20unions=20are?= =?UTF-8?q?=20not=20the=20same=20size=20as=20C=20language=20unions=20in=20?= =?UTF-8?q?some=20situations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dmd2/struct.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dmd2/struct.c b/dmd2/struct.c index 4d6d2d33..b2ffef2a 100644 --- a/dmd2/struct.c +++ b/dmd2/struct.c @@ -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;