When you want to set the "powerpc" string as a value of a define (-D or
#define), you get the integer value 1 instead of the string.
Here's an example :
test.c :
-----
Arch = ARCH
-----
With the "powerpc" string (bug) :
gcc -E -DARCH=powerpc test.c
Result is :
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"
Arch = 1
With another string (no bug) :
gcc -E -DARCH=ia32 test.c
Result is :
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"
Arch = ia32
== GCC Config ==
Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --disable-softfloat
--enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32
--enable-checking=release powerpc-linux-gnu
Thread model: posix
gcc version 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)
--
Summary: Wrong preprocessing when value of a define is "powerpc"
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: glibersat at linux62 dot org
GCC build triplet: powerpc-linux-gnu
GCC host triplet: powerpc-linux-gnu
GCC target triplet: powerpc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29546