egcs-19980502 powerpc-ibm-aix4.1.4.0 falling off end of non-void func
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue May 5 15:17:00 GMT 1998
From rs6000.md, movdf_hardfloat32, movdf_softfloat32, movdi_32
and one other place generate code for functions in insn-output.c which
look like this:
> static char *
> output_418 (operands, insn)
> rtx *operands ATTRIBUTE_UNUSED;
> rtx insn ATTRIBUTE_UNUSED;
> {
>
> {
> switch (which_alternative)
> {
> case 0:
> /* We normally copy the low-numbered register first. However, if
> the first register operand 0 is the same as the second register of
> operand 1, we must copy in the opposite order. */
> if (REGNO (operands[0]) == REGNO (operands[1]) + 1)
> return "mr %L0,%L1\n\tmr %0,%1";
> else
> return "mr %0,%1\n\tmr %L0,%L1";
> case 1:
> /* If the low-address word is used in the address, we must load it
> last. Otherwise, load it first. Note that we cannot have
> auto-increment in that case since the address register is known to be
> dead. */
> if (refers_to_regno_p (REGNO (operands[0]), REGNO (operands[0]) + 1,
> operands [1], 0))
> return "ld %L0,%L1\n\tld %0,%1";
> else
> return "ld%U1 %0,%1\n\tld %L0,%L1";
> case 2:
> return "std%U0 %1,%0\n\tstd %L1,%L0";
> }
> }
> }
Gcc warns about this:
> insn-output.c: In function `output_418':
> insn-output.c:1509: warning: control reaches end of non-void function
So I think a default: case for the switch should be added to
either abort or return a valid default value.
--Kaveh
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu Icon CMT Corp.
More information about the Gcc-bugs
mailing list