projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fixed comments
[libfirm]
/
ir
/
be
/
test
/
tailrec.c
1
static unsigned _fak(unsigned a, unsigned b)
2
{
3
if (a == 0)
4
return b;
5
6
return _fak(a-1, a*b);
7
}
8
9
static fak(unsigned a)
10
{
11
return _fak(a, 1);
12
}
13
14
15
int main(int argc, char *argv[])
16
{
17
int x = 4;
18
19
printf("%d! = %d\n", x, fak(x));
20
21
return 0;
22
}