[Bug c/31977] can return OK from "int main()" without a return statement by using a goto before the return
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu May 17 17:53:00 GMT 2007
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-05-17 18:53 -------
[pinskia-laptop:~/src] pinskia% gcc -Wreturn-type t.c
t.c: In function 'main':
t.c:15: warning: control reaches end of non-void function
This code is only undefined at runtime which means you cannot error out.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31977
More information about the Gcc-bugs
mailing list