Warnings in stl_deque.h

Martin von Loewis martin@mira.isdn.cs.tu-berlin.de
Tue Sep 22 00:26:00 GMT 1998


> 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



More information about the Gcc-bugs mailing list