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]
Other format: [Raw text]

[Bug c/31977] can return OK from "int main()" without a return statement by using a goto before the return



------- 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


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