Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "B. James Phillippe" <bryan@terran.org>
To: AXP-List <axp-list@redhat.com>
Subject: Re: More Apps porting to Alpha
Date: Mon, 9 Nov 1998 21:21:01 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.04.9811092114280.11490-100000@earth.terran.org> (raw)
In-Reply-To: <3647BE4B.2DC89988@msa.dec.com>

On Tue, 10 Nov 1998, Wai-Sun Chia wrote:

> Apparently EGCS craps out when a variable is defined as the arch name:
> i.e. alpha, i386, arm, m68k, mips, ppc, sparc, sparc64
> 
> I've confirmed it with i386 and alpha. To test yourself, try to compile
> the following simple program:
> 
> ******************** try.c *********************
> #include <stdio.h>
> 
> int main()
> {
> 	int alpha = 1;
> 	printf("alpha = %d\n", alpha);
> 	return 0;
> }
> ************************************************
> You will get a "parse error before `1'". If you change alpha to nalpha
> or beta or anything other than alpha, then it'll work!!! 

Huh?  I don't get this problem with egcs-1.0.3 or 1.1.1.  What compiler
were you using?

Script started on Mon Nov  9 21:16:27 1998
(bryan/bryan.2@earth) ~ % uname -srm
Linux 2.1.124 alpha
(bryan/bryan.2@earth) ~ % cat /tmp/try.c 
#include <stdio.h>

int main()
{
   int alpha = 1;
   printf("alpha = %d\n", alpha);
   return 0;
}

(bryan/bryan.2@earth) ~ % gcc --version
egcs-2.90.29 980515 (egcs-1.0.3 release)
(bryan/bryan.2@earth) ~ % gcc -Wall -O2 /tmp/try.c 
(bryan/bryan.2@earth) ~ % ./a.out 
alpha = 1
(bryan/bryan.2@earth) ~ % cc --version
egcs-2.91.56
(bryan/bryan.2@earth) ~ % !gcc:s/gcc/cc/
cc -Wall -O2 /tmp/try.c
(bryan/bryan.2@earth) ~ % ./a.out 
alpha = 1
(bryan/bryan.2@earth) ~ % exit

Script done on Mon Nov  9 21:17:43 1998

-bp
--
B. James Phillippe	. bryan@terran.org
UNIX Software Engineer	. http://www.terran.org/~bryan
Member since 1.1.59	. finger:bryan@earth.terran.org
MOTM: Waiting for the DSL to go in :/


  reply	other threads:[~1998-11-10  5:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-10  4:17 More Apps porting to Alpha Wai-Sun Chia
1998-11-10  5:21 ` B. James Phillippe [this message]
1998-11-10  5:27   ` Peter Petrakis
1998-11-10  8:26     ` Wai-Sun Chia
1998-11-10  5:27   ` Peter Petrakis
1998-11-10  8:50   ` philb
1998-11-10  5:34 ` Alex Pilosov
1998-11-10  8:16   ` Wai-Sun Chia
1998-11-10  7:56 ` Peter Rye
1998-11-10 10:06   ` Wai-Sun Chia
1998-11-10 12:51 ` Paul Tomblin
1998-11-10 13:59 ` Alvin Starr
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox