From: AndrewJ Newsgroups: comp.os.msdos.djgpp Subject: Re: gcc bug ? Message-ID: <978frso2b23m6odcei3a0svg7ss077s4od@4ax.com> References: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 33 Date: Thu, 07 Sep 2000 14:10:10 GMT NNTP-Posting-Host: 24.42.120.18 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 968335810 24.42.120.18 (Thu, 07 Sep 2000 07:10:10 PDT) NNTP-Posting-Date: Thu, 07 Sep 2000 07:10:10 PDT Organization: Excite AT Home - The Leader in Broadband To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >Hello, > >when a build my C app with gcc2952, i receive this error message : > >poly1.c: In function `main': >poly1.c:87: warning: return type of `main' is not `int' According to the C Standard, main can be either: int main(void); -or- int main(int argc, char *argv[]); void main(void) is ILLEGAL! Some compilers also allow: int main(int argc, char *argv[], char *env); Or something like that, but that is considered an implementation extention and is not portable. >poly1.c:240: Invalid `asm' statement: >poly1.c:240: fixed or forbidden register 2 (cx) was spilled for class CREG. >poly1.c:319: Invalid `asm' statement: >poly1.c:319: fixed or forbidden register 2 (cx) was spilled for class CREG. > >but when i build it with an old gcc version (281), it works correctly. > >Is there anyone who know this problem ? bug ? Don't know about this one. See Damian and Eli's responses. -- AndrewJ