> 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.
Paolo Invernizzi
2004-Oct-18 14:13 UTC
[LLVMdev] Fix for non-standard variable length array
I submitted a patch with a std::vector, but was commited as alloca ;-P --- P On Oct 18, 2004, at 4:04 PM, Morten Ofstad wrote:>> 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. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
Paolo Invernizzi wrote:> I submitted a patch with a std::vector, but was commited as alloca ;-Pfor the other problem? I made a nice clean patch using std::vector in LiveVariables.cpp now, which I include with this message... By the way, where do you submit the patches if not to the mailing list? I thought I should post here so Paolo and others interested in the porting effort can apply them locally without waiting for them to be accepted in the main tree, but maybe there is a better way? m. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041018/b57cb59d/attachment.txt>
Possibly Parallel Threads
- [LLVMdev] Fix for non-standard variable length array
- [LLVMdev] Fix for non-standard variable length array
- [LLVMdev] Fix for non-standard variable length array
- [LLVMdev] Fix for non-standard variable length array + Visual C X86 specific code
- [LLVMdev] Fix for non-standard variable length array