64-bit addressing

in Current Mac Hardware edited January 2014
There is a guy on the Apple forums that wonders why this code does not compile. I tried it and it compiles with the variable A declared as long but not as long long or double.


#include <stdio.h>

#include <math.h>

#define X 128

#define Y 128

#define Z 128

#define T 129

long long A[X][Y][Z][T];

int x, y, z, t;

main() {


program uses %g MBytes\


for (x=0;x<X;++x) {

for (y=0;y<Y;++y) {

for (z=0;z<Z;++z) {

for (t=0;t<T;++t) {







lundys-Dual-G5:~/Desktop lundy$ gcc -fast -mpowerpc64 Test.c

Test.c:8: error: size of variable `A' is too large

lundys-Dual-G5:~/Desktop lundy$

Seems to me that 36-bit addressing should do it. Any clues?


Sign In or Register to comment.