hilfingr%tully.Berkeley.EDU@GINGER.BERKELEY.EDU (Paul Hilfinger) (09/07/89)
I get the incorrect warning message
bad-msg1.c:17: warning: control reaches end of non-void function
when compiling the appended file with command line
gcc -g -Wall -c bad-msg1.c
or the (also incorrect) warning message
bad-msg1.c:17: warning: this function may return with or without a value
when compiling with
gcc -g -W -c bad-msg1.c
The messages go away with the -O switch.
Gcc version 1.35 on a Sun-3 (md == m68k.md, tm.h == tm-sun3-nfp.h).
-- P. N. Hilfinger
---------------------------------------- cut here --------------------
static int getToken()
{
int xxx;
if (xxx) {
if (xxx)
return xxx;
else
return xxx;
}
else if (xxx) {
return xxx;
}
else {
return xxx;
}
}