Mail Archives: djgpp/1998/06/17/13:09:29
> :Note also that `main' must return `int'.
>
> Why is that important? If I just ignore the warning and carry on
> using void am I going to have problems? Or is it just one of those
> "C things"?
Your program will always return *something*. If you don't do it
yourself, whatever garbage happens to be in that spot will get used by
default. Since many other djgpp programs check this code ("make" is
one very important example), it's important that you make sure it
returns something reasonable.
For example, if you called your program in a Makefile and it returned
some non-zero garbage, make would stop at that point, thinking it was
an error.
- Raw text -