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: Warnings in stl_deque.h


> 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


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