This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: problems with -Dalpha or -Di386
- To: Martin Kahlert <martin dot kahlert at mchp dot siemens dot de>
- Subject: Re: problems with -Dalpha or -Di386
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 10 Nov 1998 12:00:23 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199811101050.LAA23810@keksy.mchp.siemens.de>you write:
> Hi,
> bug from comp.os.linux.alpha:
>
> #include <stdio.h>
> int main(int argc,const char *argv[])
> {
> int i386=1;
> printf("i386=%d\n",i386);
> return 0;
> }
>
> results in parse error before `1'
> (cpp replaces i386 by 1 on x86-machines)
> this is egcs-1.1b
>
>
> This is not a big problem on x86,
> but same thing happens on alpha.
> alpha is not a seldom used variable name.
>
> Doesn't the standard say, defines for the compiler should be
> prepended by __ or something like that?
Yes. That's one of the reasons to remove -Dalpha and -Di386. However,
removing them has some serious side effects -- imake for example depends
on them (sigh). We're trying to wean folks from "alpha" and "i386" to
"__alpha__" and "__i386__", but it's a slow process.
jeff