Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!meiko.co.uk!jim From: jim@meiko.co.uk Newsgroups: gnu.gcc.bug Subject: A bug ! Message-ID: <6885.8905251636@subnode.meiko.co.uk> Date: 25 May 89 16:36:27 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 37 From : James Cownie Meiko Limited Aztec West Bristol GREAT BRITAIN The following function gives an incorrect warning gccbug.c: In function localise: gccbug.c: warning: control reaches end of non-void function when compiled with gcc 1.34 on a SUN under SUNOS 3.5 by the command gcc -Wall gccbug.c interestingly the warning is NOT produced if optimisation is enabled gcc -O -Wall gccbug.c I know this is NOT a serious bug, but it is slightly irritating ! Our gcc was built in the default manner for a SUN3. Good luck James Cownie int localise(int nd) { if (nd == 0) return nd; else { if (nd == 2) { if (nd == 3) return nd + 1; else return nd + 2; } else return nd + 3; } }