Crash with foreach handle Variadic Templates
lili
akozhao at tencent.com
Sat Aug 24 01:25:46 UTC 2019
Hi:
I'm writing an OS kernel run in i386 mode.
where is crash when I implement a std.stdio.write like
function and pass a long type argument. see code below:
void printlnA...)(A a)
{
foreach(v;a)
{
}
}
long xr=100;
println(xr); //crash
println(100); //ok
compile with ldc2 -betterC -m32
then run
qemu-system-i386 -kernel kernel -serial stdio -m 1024M
Is where has a bug in implementation.
More information about the digitalmars-d-ldc
mailing list