No error or warning

Martin v. Loewis martin@mira.isdn.cs.tu-berlin.de
Thu Sep 30 19:57:00 GMT 1999


> I am using gcc 2.95 and it is not complaining about functions with return
> value defined but no return statement even with -WAll switch.
> You can try the following code.

Thanks for your bug report. I could not reproduce the problem.
On i586-pc-linux-gnu, gcc 2.95 gives:

a.c: In function `func':
a.c:3: warning: control reaches end of non-void function
a.c: In function `main':
a.c:7: warning: implicit declaration of function `printf'
a.c:8: warning: control reaches end of non-void function

If I really use -WAll, it says

cc1: Invalid option `-WAll'

Hope this helps,
Martin



More information about the Gcc-bugs mailing list