http://d.puremagic.com/issues/show_bug.cgi?id=9766
Summary: align(n) with n compile-time constant
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-03-20 11:10:12 PDT ---
enum uint myAlignment = 16;
align(myAlignment) struct Foo {}
void main() {}
DMD 2.063alpha gives:
temp.d(2): Error: positive integer expected, not myAlignment
With this a single compile-time constant change is enough to modify at the same
time and in the same way for different CPUs various alignments in the code.
It's good to be more DRY and avoid magic constants.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------