egcs-19980502 powerpc-ibm-aix4.1.4.0 falling off end of non-void func

Jeffrey A Law law@cygnus.com
Tue May 5 22:31:00 GMT 1998


  In message < 199805052129.RAA10013@caip.rutgers.edu >you write:
  > 	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:
[ ... ]

  >  > 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.
I'd say it's up to the port maintainers to decide if/how they want to
handle this case.  Basically I'm less concerned about fixing warnings
in the backends right now than finishing some of the other stuff
on our collective plate.

An abort is probably the best thing to do since (in theory) the
output code handles all the cases that can actually occur.

jeff



More information about the Gcc-bugs mailing list