lkml.org 
[lkml]   [1998]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.1.90][PATCH] Cleaning up linux-2.1.90.
Niels Kristian Bech Jensen wrote:
>
> On Wed, 18 Mar 1998, Thomas Sailer wrote:
>
> > > - exit(0);
> > > + return(0);
> >
> > > - exit(0);
> > > + return(0);
> >
> > Huh? What is that supposed to do? If exit(0) gives you warnings,
> > either your compiler or your header files are broken.
> >
> int main() must return() something.
> ^^^
> The warnings was ``main() isn't type int'' (or something like that.)

But in the case of exit the procedure end is never reached.
If the prototype of exit is correctly marked as noreturn
(extern void exit(int) __attribute__ ((noreturn));) then
gcc won't barf.

Tom

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.028 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site