Remove warning when __builtin_frame_address is used with gcc >= 6.
[tinycc.git] / examples / ex3.c
blob7c466ad54dd4879a4401b97fb1d9417d4734c79e
1 #include <stdlib.h>
2 #include <stdio.h>
4 int fib(n)
6 if (n <= 2)
7 return 1;
8 else
9 return fib(n-1) + fib(n-2);
12 int main(int argc, char **argv)
14 int n;
15 if (argc < 2) {
16 printf("usage: fib n\n"
17 "Compute nth Fibonacci number\n");
18 return 1;
21 n = atoi(argv[1]);
22 printf("fib(%d) = %d\n", n, fib(n, 2));
23 return 0;