Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by lbr (5199) on 2007.05.10 2:53 (#54975)
    It's actually pretty straightforward:

    #include <stdio.h>
    #include <stdarg.h>

    void bar(int cnt, ...) {
        va_list ap;
        while (cnt--) {
            int a = va_arg(ap, int);
            printf("%d ", a);

    int main() {
        void (*b)(int, ...);
        b = bar;
        return 0;

    Or did I miss something?
    • Or did I miss something?

      Hmm, no. I missed b = bar; in my example, which leads me to wonder why there was no crash.

      Thanks for the sanity check! Now I need to figure out how to add varargs support to NCI.