How can we help you today? How can we help you today?

stackalloc does not disassemble correctly

Hello,
if I disassemble this C# code:

const int SIZE = 20;
int* fib = stackalloc int[SIZE];

I get this in the C# disassembly window:

int* fib = (int*) stackalloc byte[(((IntPtr) 20) * 4)];

Which is not exactly the correct syntax (i.e. can't multiply an IntPtr, (int *) cast is not accespted before stackalloc...

Is there anything that could be improved in Reflector?
Thanks,
Olivier
Xerces
0

Comments

1 comment

  • Clive Tong
    Hi.

    When I try the C# code you give, I only see expressions along the lines of
    int* numPtr = stackalloc int[20];

    Can you send me an assembly containing code that generates the output you posted?

    Thanks
    Clive Tong
    0

Add comment

Please sign in to leave a comment.