This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __i386__ not defined
- To: Roger Collins <roger at ProProject dot com>
- Subject: Re: __i386__ not defined
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Tue, 23 Jan 2001 18:39:33 +0000
- Cc: gcc at gcc dot gnu dot org
- References: <NEBBJJFHGLJIMPFMHKBDEECPCFAA.roger@ProProject.com>
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.