18 Dec
2008
18 Dec
'08
10:13
On Thu, 18 Dec 2008 08:25:22 +0100, you wrote:
int func(int i) { switch(i) { case 1: return 4; case 2: return 5; } /* no return after switch statement */ }
From a compilers POV this isn't OK. The compiler can't know that all possible values of i have been handled, so it must assume that there's a possibility that the end end of the function is reached and so warns of the missing return. Philipp -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org