This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Warnings in stl_deque.h
- To: peter dot simons at gmd dot de
- Subject: Re: Warnings in stl_deque.h
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 22 Sep 1998 09:23:55 +0200
- CC: egcs-bugs at cygnus dot com
- References: <199809211043.MAA17933@peti.gmd.de>
> Curiously enough I get no warning about the missing return statement
> in main(). :-)
This is easy to answer: You don't need one. main, as a special case,
is defined to return 0 if control falls off the end of the function.
You get the warning if control leaves the function without a return
value, since this is undefined behaviour.
Regards,
Martin