From: John Shaw on
> One of them, C4715, is "not all control paths return a value". Sure
> enough, the function in question has a return type of int, and there
> are various embedded returns but no final return at the end, a control
> path that it can get to.

Warning! I once tried to fix all the functions that where suppose to
return an 'int' in a legacy C application and it broke the
application.

> So my question is, "why is this not a fatal compilation error?".
> Further, I note that GCC does not even issue a warning (at least not
> with the default warning level).

One example where you would not have a return statement, is when you
write embedded assembly code and load the return register your self
(been there). In that case a final return statement would be
redundant; in any other it would be unknown (probably not 0 thou).
This is another compiler implementation defined situation.

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]