Messages in this thread | | | From | "Adam J. Richter" <> | Date | Wed, 18 Mar 1998 08:27:46 -0800 | Subject | Re: [2.1.90][PATCH] Cleaning up linux-2.1.90. |
| |
In article <350FE7FC.6923@ife.ee.ethz.ch> you write: >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
Even so, using return(0) will be more portable to other compilers, so it is better to use return(0) anyhow.
-- Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205 adam@yggdrasil.com \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |