www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/07/10:15:35

From: AndrewJ <luminous-is AT REMOVE DOT home DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc bug ?
Message-ID: <978frso2b23m6odcei3a0svg7ss077s4od@4ax.com>
References: <Hjnt5.401$Mf2 DOT 1680433 AT nnrp1 DOT proxad DOT net>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019