digitalmars.D.bugs - [Issue 10149] New: align() expects integer literal
- d-bugmail puremagic.com (24/24) May 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10149
- d-bugmail puremagic.com (15/15) May 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10149
- d-bugmail puremagic.com (12/12) May 23 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10149
http://d.puremagic.com/issues/show_bug.cgi?id=10149 Summary: align() expects integer literal Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: turkeyman gmail.com This works fine: align(16) int x; This doesn't: enum alignment = 16; align(alignment) int x; Or any other expression for that matter. Can't do: align(T.alignof) int x; This makes some generic code impossible. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 23 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10149 Max Samukha <samukha voliacable.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |samukha voliacable.com PDT --- dmd has quite a few bugs like that. Your case should be easy to workaround with a string mixin. Something like: enum alignment = 16; mixin("align(" ~ to!string(alignment) ~") int x;"); // or mixin(format("align(%s) int x;", T.alignof)); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 23 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10149 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bearophile_hugs eml.cc Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 9766 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 23 2013