AIX Questions

Perry Smith pedzsan at gmail.com
Thu Jul 24 02:32:31 CEST 2008


On Jul 23, 2008, at 12:54 PM, Torbjorn Granlund wrote:

> Perry Smith <pedzsan at gmail.com> writes:
>
>  There are already conventions for AIX for 64 bit mode as far as cpp
>  flags and I'm fairly sure that gcc follows them.
>
>  __64BIT__ is defined if the comiler is in 64 bit mode.
>
> Perhaps __64BIT__ is defined by "the compiler", but it is not defined
> by any GCC on any of the machine I use.


Not true.  gcc defines __64BIT__

cat hello.c
#ifdef __64BIT__
int main() { printf("hello 64\n"); }
#else
int main() { printf("hello 32\n"); }
#endif

gcc -maix64 -o hello hello.c
hello.c: In function 'main':
hello.c:2: warning: incompatible implicit declaration of built-in  
function 'printf'

./hello
hello 64

rm hello

gcc -o hello hello.c
hello.c: In function 'main':
hello.c:4: warning: incompatible implicit declaration of built-in  
function 'printf'

./hello
hello 32

Perry
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



More information about the gmp-discuss mailing list