allow on stack with betterC
test
test at gmail.com
Tue Oct 23 13:02:15 UTC 2018
On Tuesday, 23 October 2018 at 11:17:03 UTC, Dennis wrote:
> On Tuesday, 23 October 2018 at 10:18:56 UTC, test wrote:
>> I can not user static array because the length is a runtime
>> vars.
> When compiling with dmd and -betterC I got a linker error
> "undefined reference to '__alloca'", but with LDC it worked
> fine.
Thanks, alloca is what i am look for.
to @Tony
when you use "scope tmp = new ubyte[4]", it is much fast then
malloc because it is on stack.
More information about the Digitalmars-d-learn
mailing list