This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs, trunk 8/30 solaris2.5 control reaches end of non-void function
- To: ghazi at caip dot rutgers dot edu
- Subject: Re: egcs, trunk 8/30 solaris2.5 control reaches end of non-void function
- From: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Date: Mon, 31 Aug 1998 15:10:32 -0700
- CC: egcs-bugs at cygnus dot com
- References: <199808311455.KAA22725@caip.rutgers.edu>
Date: Mon, 31 Aug 1998 10:55:48 -0400 (EDT)
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
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.
Later,
David S. Miller
davem@dm.cobaltmicro.com