Fix gawk miscompile
[tinycc.git] / tests / tests2 / 42_function_pointer.c
blob697bd79a6eb9fe33b5ceca06a65dad3ef09979cf
1 #include <stdio.h>
3 int fred(int p)
5 printf("yo %d\n", p);
6 return 42;
9 int (*f)(int) = &fred;
11 /* To test what this is supposed to test the destination function
12 (fprint here) must not be called directly anywhere in the test. */
13 int (*fprintfptr)(FILE *, const char *, ...) = &fprintf;
15 int main()
17 fprintfptr(stdout, "%d\n", (*f)(24));
19 return 0;
22 /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/