digitalmars.D.bugs - [Issue 9766] New: align(n) with n compile-time constant
- d-bugmail puremagic.com (25/25) Mar 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9766
- d-bugmail puremagic.com (10/10) May 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9766
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: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc 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: -------
Mar 20 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9766 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |turkeyman gmail.com *** Issue 10149 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 23 2013