bug egcs 1.1.1

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Wed Jun 30 23:07:00 GMT 1999


> If a function that should return a value does not, no error or warning
> is given.

Sure there is a warning

mira% cat a.c
int something;
int foo(void)
{
   if (something == 5) return 12;
}
mira% gcc -W a.c -c
a.c: In function `foo':
a.c:5: warning: control reaches end of non-void function

Hope this helps,
Martin



More information about the Gcc-bugs mailing list