5439 – 64bit struct alignment inconsistent with C ABI

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5439 - 64bit struct alignment inconsistent with C ABI
Summary: 64bit struct alignment inconsistent with C ABI
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
Reported: 2011年01月09日 11:03 UTC by Iain Buclaw
Modified: 2015年06月09日 05:12 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Iain Buclaw 2011年01月09日 11:03:22 UTC
This was caused by bug2821. On 64bit, doubles are 8-byte aligned, not 4, so
struct { long, short }
Should have a sizeof = 16, not 12.
Btw, would be nice if you offered a -malign-double type flag to say "Yes, I want 8 byte aligned doubles on 32bit Linux" :)
Regards
Comment 1 Iain Buclaw 2011年01月09日 11:05:08 UTC
To save you searching for it, lookup "TypeBasic::alignsize"
Comment 2 Walter Bright 2011年01月11日 00:05:55 UTC
http://www.dsource.org/projects/dmd/changeset/861 


AltStyle によって変換されたページ (->オリジナル) /