Found something. It may be a gcc compatibility issue, with gcc not defining the right values for the AIX headers to figure out if they're supposed to be 32-bit or 64-bit.
I'm on a 64bit power pc 5 system. I've set the flag -maix64 manually. I don't think this is necessary because in the specs for gcc I see that it's already set to 64bit. I think I tried al solutions that google turns up in discussion groups already ...