import core.stdc.stdlib;
void doAlloca() pure {
alloca(8);
}
void main() {
doAlloca();
}
Error: pure function 'doAlloca' cannot call impure function 'alloca'
Comment #1 by bearophile_hugs — 2011-04-23T14:13:58Z
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);
Comment #2 by lt.infiltrator — 2014-03-19T17:40:05Z
*** This issue has been marked as a duplicate of issue 4222 ***