[Bug c++/52003] warning about (un)existing return statement in the main function declared 'noreturn'
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 26 13:18:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52003
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-26
Ever Confirmed|0 |1
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-26 11:19:02 UTC ---
(In reply to comment #2)
> main has an implicit return 0 if it follows through to the end according to the
> C++ standard IIRC.
Indeed it does. GCC simply tells you that putting 'noreturn' on main
is not good.
If we don't want this warning maybe the C++ FE should mark that return
stmt with TREE_NO_WARNING and we should honor that flag.
More information about the Gcc-bugs
mailing list