search for: va_list2

Displaying 3 results from an estimated 3 matches for "va_list2".

Did you mean: va_list
2006 Oct 05
3
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
Hi, Chris Lattner wrote: > All the non-vastart calls can be anywhere. va_end in particular codegens > to a noop on all targets llvm currently supports, fwiw. > Things go well, except for the following (pathological?) C program: int va_double_sum(int count,...){ int i,sum=0; va_list ap; va_start(ap,count); for(i=0;i<count;i++){ sum+=va_arg(ap,int); } va_end(ap);
2006 Oct 05
0
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
On Thu, 5 Oct 2006, Bram Adams wrote: > Apparently, the problem is how to "rewind" the vararg-argument back to > its first element when the second loop is reached, as it seems that the > code just continues at position count and beyond, resulting in overflow. > > I'm not sure whether this code snippet is valid ANSI C, and if it is, > one probably shouldn't use
2006 Oct 05
1
[LLVMdev] Extracting all BasicBlocks of a Function into new Function
...:05 heeft Ryan Brown het volgende geschreven: > I don't know if that's valid but what about something like this: > int va_double_sum(int count,...){ > /*declare va_list for each original va_start*/ > /*llvm.va_start for each va_list*/ > /*call extracted_sum(count,va_list1, va_list2, ...)*/ > } That should work, I think, ... Op 5-okt-06, om 20:51 heeft Chris Lattner het volgende geschreven: > Why not va_copy the input valist? ... and so would this. The only problem left is that both require an easy way to replace each use of the original va_list situated AFTER a...