[1880] in Athena Bugs

home help back first fref pref prev next nref lref last post

Saber gripe: v2.0.4 (12/20/88 multics vax unix 2669 0)

daemon@ATHENA.MIT.EDU (raeburn@ATHENA.MIT.EDU)
Sat Mar 11 12:31:23 1989

From: <raeburn@ATHENA.MIT.EDU>
Date: Sat, 11 Mar 89 12:31:07 EST
To: bugs@ATHENA.MIT.EDU
Saber apparently does not understand when a function does not return,
or does not make use of the information when the function is used.

My source file:

    /*
     * frep
     */

    void abort (void) {
	while (1)
	    saber_stop ("");
	/*NOTREACHED*/
    }

    int xyzzy (int y) {
	if (y < 0)
	    return y * y;
	else
	    abort ();
    }

I get the warning message:

2 -> load quux.c
Loading: quux.c

----------------
"quux.c":16, xyzzy(), Function exits through bottom (Warning #263)
    14:     else
    15:         abort ();
 *  16: }
The function both returns with a value and exits through the bottom.
3 ->

...even though there is no way for this function to return normally
without returning a value.

-- Ken

home help back first fref pref prev next nref lref last post