aboutsummaryrefslogtreecommitdiff
path: root/tests/core/test_functionpointer_libfunc_varargs.in
blob: 6cabe8c549d8b89a7539b8a77c7abd80a49eb3e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
      #include <stdio.h>
      #include <fcntl.h>
      typedef int (*fp_t)(int, int, ...);
      int main(int argc, char **argv) {
        fp_t fp = &fcntl;
        if (argc == 1337) fp = (fp_t)&main;
        (*fp)(0, 10);
        (*fp)(0, 10, 5);
        printf("waka\n");
        return 0;
      }