__i386__ not defined
Neil Booth
neil@daikokuya.demon.co.uk
Tue Jan 23 10:39:00 GMT 2001
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.
More information about the Gcc
mailing list