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


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]