Strange lint mumblings

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Dec 15 10:26:18 AEST 1988


In article <416 at marob.MASA.COM> daveh at marob.masa.com (Dave Hammond) writes:
>Can anyone explain why the statement:
>    exit(0);	/* followed immediately by main's closing brace */
>causes lint to complain:
>(137)  warning: main() returns random value to invocation environment

"lint" doesn't know that exit() never returns.
Put /*NOTREACHED*/ after exit to tell "lint" this.

This discussion occurred only a few months ago..



More information about the Comp.lang.c mailing list