Will I get away with code like this in Cython?

void foo(int n) {
   int stack[n];
   ...
}

I.e. what C language level are we targeting exactly? Also, does the 
above cause a proper stack allocation?

I get

test.c:15: warning: ISO C90 forbids variable-size array ‘arr’

with -ansi -pedantic but otherwise gcc seems happy enough.

(I can get away without doing this as the caller knows the size 
compile-time and can supply the needed stack in the caller function 
stack frame, but this would make the code a lot nicer.)

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to