Re: [2.1.90][PATCH] Cleaning up linux-2.1.90.

Thomas Sailer (sailer@ife.ee.ethz.ch)
Wed, 18 Mar 1998 16:27:56 +0100


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