On 01/16/2012 02:03 PM, Bakul Shah wrote: > On Jan 16, 2012, at 10:51 AM, Greg Comeau <[email protected]> wrote: >> What we do in problematic cases with Comeau is to generate code to >> arrange for the allocation of the VLA on the heap. I'm not saying >> this is perfect, but at least it gets the feature implementable and up >> and running as "a portable implementation" versus perhaps not being >> able to implement it at all on some platforms. > > How do you deal with longjmp?
I recall reading the source for a (mostly-) portable alloca() that checked where on the call-stack is was invoked from and released memory for any alloca() invocation from lower on the stack. (The allocations themselves were on the heap.) --Joel
