[LLVMdev] Fix for non-standard variable length array
Morten Ofstad
morten at hue.no
Mon Oct 18 07:04:43 PDT 2004
> There was a similar problem some time ago, and was resolved with alloca.
> I think it's a better solution to use the stack instead of the heap...
Actually, I looked into this and alloca is not standard C++ since it can
create problems for the exception handling (although it compiles fine
with Visual C). This is probably why there have been compilation
problems on some platforms (see
http://mail.cs.uiuc.edu/pipermail/llvmdev/2004-September/001992.html) --
A better alternative is maybe to use the std::vector instead of a VLA.
m.
More information about the llvm-dev
mailing list