c++/1862

Kaiyuan Huang khuang@sympatico.ca
Sun Apr 1 00:00:00 GMT 2001


The following reply was made to PR c++/1862; it has been noted by GNATS.

From: Kaiyuan Huang <khuang@sympatico.ca>
To: Craig Rodrigues <rodrigc@mediaone.net>
Cc: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Subject: Re: c++/1862
Date: Sat, 17 Feb 2001 17:06:54 -0500

 --------------E35D2593527D55175343DE44
 Content-Type: text/plain; charset=gb2312
 Content-Transfer-Encoding: 7bit
 
 Craig Rodrigues wrote:
 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1862&database=gcc
 >
 > Tested with:
 >
 > gcc version 2.97 20010211 (experimental)
 > from http://www.codesourcery.com/gcc-snapshots/
 > under i386 Linux.
 >
 > Compiling  yielded the error:
 > test.cc:12: `main' must return `int'
 >
 > Changing you main() to return an int:
 >
 > #include "stdio.h"
 >
 > class myclass
 > {
 >         public:
 >         int x;
 >         int y;
 > };
 >
 > int main(void)
 > {
 >         myclass x;
 >         x.x=7;
 >         x.y=8;
 >
 >         return 0;
 > }
 >
 > Compiled and ran fine with no errors/warnings.
 > Perhaps the person who created the gcc package
 > for you created a package with errors in it?
 
 I actually tried to have main() with int return or void return type
 before
 I submitted the problem report and it  did not make any difference.
 
 I downloaded the gcc package
 from SUN's website.   My environment is a sun ultra 5 running
 Solaris 8, which is different from yours.   The version of gcc
 I am using is 2.95.2.   I am wondering if this version  is not quite
 compatible with Solaris 8.  Maybe I need to try to download the
 source code and compile it under Solaris 8.
 
 thanks,
 
 Kaiyuan
 
 >
 >
 > Should this report be closed?
 > --
 > Craig Rodrigues
 > http://www.gis.net/~craigr
 > rodrigc@mediaone.net
 
 --------------E35D2593527D55175343DE44
 Content-Type: text/html; charset=gb2312
 Content-Transfer-Encoding: 7bit
 
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <html>
 Craig Rodrigues wrote:
 <blockquote TYPE=CITE><a href=" http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1862&database=gcc "> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1862&database=gcc </a>
 <p>Tested with:
 <p>gcc version 2.97 20010211 (experimental)
 <br>from <a href=" http://www.codesourcery.com/gcc-snapshots/ "> http://www.codesourcery.com/gcc-snapshots/ </a>
 <br>under i386 Linux.
 <p>Compiling  yielded the error:
 <br>test.cc:12: `main' must return `int'
 <p>Changing you main() to return an int:
 <p>#include "stdio.h"
 <p>class myclass
 <br>{
 <br>        public:
 <br>        int x;
 <br>        int y;
 <br>};
 <p>int main(void)
 <br>{
 <br>        myclass x;
 <br>        x.x=7;
 <br>        x.y=8;
 <p>        return 0;
 <br>}
 <p>Compiled and ran fine with no errors/warnings.
 <br>Perhaps the person who created the gcc package
 <br>for you created a package with errors in it?</blockquote>
 
 <p><br>I actually tried to have main() with int return or void return type
 before
 <br>I submitted the problem report and it  did not make any difference.
 <p>I downloaded the gcc package
 <br>from SUN's website.   My environment is a sun ultra 5 running
 <br>Solaris 8, which is different from yours.   The version of
 gcc
 <br>I am using is 2.95.2.   I am wondering if this version 
 is not quite
 <br>compatible with Solaris 8.  Maybe I need to try to download the
 <br>source code and compile it under Solaris 8.
 <p>thanks,
 <p>Kaiyuan
 <blockquote TYPE=CITE> 
 <p>Should this report be closed?
 <br>--
 <br>Craig Rodrigues
 <br><a href=" http://www.gis.net/~craigr "> http://www.gis.net/~craigr </a>
 <br>rodrigc@mediaone.net</blockquote>
 </html>
 
 --------------E35D2593527D55175343DE44--
 



More information about the Gcc-prs mailing list