aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/function_pointers.sh
blob: cddc623e1216f776bf38d76d0696f7f1f74af283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cat <<'EOF' > expected
a
h
g
EOF

test_diff <<'EOF'
int* f1(int a);
int (*f2)(int a);

extern int atexit (void (*) (void));
extern int atexit (void (*fn) (void));

int printf(const char*, ...);

void g() { printf("g\n"); }
void h() { printf("h\n"); }

int main() {
    atexit(g);
    atexit(h);
    printf("a\n");
}
EOF