April 23, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5874

           Summary: alloca should be pure
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: dsimcha@yahoo.com


--- Comment #0 from David Simcha <dsimcha@yahoo.com> 2011-04-23 12:28:36 PDT ---
import core.stdc.stdlib;

void doAlloca() pure {
    alloca(8);
}

void main() {
    doAlloca();
}

Error: pure function 'doAlloca' cannot call impure function 'alloca'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 23, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5874


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from bearophile_hugs@eml.cc 2011-04-23 14:13:58 PDT ---
I approve of this.

In the meantime a workaround is to use a extern in the module (it's not
@trusted):

extern(C) pure nothrow void* alloca(in size_t size);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------