This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: __i386__ not defined


Neil,

Thanks for the debugging tips.  I corrected the problem by changing a gcc
config file:

gcc/config/i386/xm-i386.h

I changed

#define __i386__

to

#define __i386__ 1

Make sense?

Can someone get this change in?

Roger

> -----Original Message-----
> From: Neil Booth [mailto:neil@daikokuya.demon.co.uk]
> Sent: Tuesday, January 23, 2001 1:40 PM
> To: Roger Collins
> Cc: gcc@gcc.gnu.org
> Subject: Re: __i386__ not defined
>
>
> Roger Collins wrote:-
>
> > Following the textbook native procedure on a clean download
> > (20010115), it gets a compile error because __i386__ is not defined.
>
> Not quite...
>
> > The line of code that causes the error reads
> >
> > #if __i386__
> >
> > The error message is "#if with no expression."
>
> Right.  If an identifier is not defined, it is replaced with 0 in
> preprocessor expressions, so the above line would become
>
> #if 0
>
> which is fine and legal.  Instead, what's happened is that somewhere you
> have a
>
> #define __i386__
>
> and then the preprocessor expression becomes
>
> #if
>
> which is not good.  To find out why your macro is the way it is, compile
> with
>
> gcc -E -dD
>
> or
>
> gcc -E -dM
>
> which will show which macros are defined where.
>
> Neil.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]