warning: return type of main is not int

Joseph H. Buehler jhpb@sarto.gaithersburg.md.us
Sat Jan 17 01:40:00 GMT 1998


Byeong-ryeol Kim <jinbo21@soback.kornet.nm.kr> writes:

>  I often met this warning after installing egcs on rh 5.0.
>  Is this harmless?
>  The typical code is as follows:
> ....
> void main(int argc, char *argv[])
> {

That's illegal C/C++, I believe.  The operating system expects an
integer return value from main().

Joe Buehler



More information about the Gcc mailing list