egcs, trunk 8/30 solaris2.5 control reaches end of non-void function

David S. Miller
Mon Aug 31 15:31:00 GMT 1998

   Date: Mon, 31 Aug 1998 10:55:48 -0400 (EDT)
   From: "Kaveh R. Ghazi" <>

	   Given the logic, it does appear that one can fall off the end
   inside the nested if's.

It can't fall off the end, but flow can't be expected to see why.

    >   if (SPARC_SIMM13_P (i) || SPARC_SETHI_P (i))
    >     {

In here, 'i' MUST be SIMM13_P or SETHI_P

    >       operands[1] = GEN_INT (i);
    >       if (SPARC_SIMM13_P (INTVAL (operands[1])))
    >         return \"mov\\t%1, %0\";
    >       else if (SPARC_SETHI_P (INTVAL (operands[1])))     <<<---+
    >         return \"sethi\\t%%hi(%a1), %0\";   <<<--- this is the problem?
    >     }

We just did a GEN_INT on 'i' so the same invariants hold for
INTVAL (operands[1]) as did for 'i' before.  Thus one of those returns
will execute.

I am going to recode it so that these warnings go away, thanks for
reminding me of it.

David S. Miller

More information about the Gcc-bugs mailing list