From mboxrd@z Thu Jan 1 00:00:00 1970 From: mrs@wrs.com (Mike Stump) To: egcs@cygnus.com, jinbo21@soback.kornet.nm.kr Subject: Re: warning: return type of main is not int Date: Fri, 16 Jan 1998 19:49:00 -0000 Message-id: <199801170153.RAA00076@kankakee.wrs.com> X-SW-Source: 1998-01/msg00536.html > Date: Fri, 16 Jan 1998 10:52:41 +0900 (KST) > From: Byeong-ryeol Kim > To: egcs@cygnus.com > I often met this warning after installing egcs on rh 5.0. > Is this harmless? > void main(int argc, char *argv[]) This is reasonably safe, but wrong for C++. The return type should be int not void. Why bother asking us, it takes less time to fix the code as the compiler instructs. return 0, if you don't know of a better value to return.