Right at the start of creating my own backend, just making it trace all calls 
to it and do the minimum to not have the compiler complain. Overcome a few 
issues but:

Compiling examples/fib.c I get

warning: function might return no value:

I simplified it a bit so I could follow the code path

int fib(n)
{
                if (n <= 2)
                                return 1;
                else
                                return 2;//return fib(n-1) + fib(n-2);
}

I obviously am not doing something I am supposed to do but cant see what.

Here all the calls to me

gfunc_prolog(000001FC69CF9B50)
gen_opi(158)
load(0, 306)
gen_opi(149)
gjmp_append(0, 0)
load(0, 48)
gjmp(0)
gjmp(0)
load(0, 48)
gjmp(8)
../examples/fib.c:10: warning: function might return no value: 'fib'
gfunc_epilog()
gfunc_prolog(000001FC69CF9A00)
load(0, 48)
store(0, 306)
gfunc_call(1)
gfunc_call(3)
load(0, 48)
gfunc_epilog()

Somewhere in those calls I was supposed to do something, but did not. I read 
through (and stepped through) the code in the i386gen and cannot see what I am 
missing
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to