lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Jun 26, 2008 at 11:59 AM, Cooper Clauson <> wrote:
> Thanks so much, that fixed the problem!
> I have no idea why the compiler didn't check that.  I'm submitting a bug report about it.

Compilers normally don't check for missing return statements because
it's impossible to do in the general case.


int f() {

in the case where g() never returns normally (i.e., it terminates
execution or throws an exception).  Warning about f would be bad in
those cases, but failing to warn if g() ever does return is bad too,
and adding runtime checks is also bad (as it adds overhead).

-- James