This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: No error or warning


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]