Re: Size of int vs. long vs. void * vs. Fortran INTEGER
"Kevin B. McCarty" <kmccarty@Princeton.EDU> writes:
> Hi all,
>
> I am embarking on the ambitious project of getting Cernlib to work on
> 64-bit arches, thanks to Mattias Wadenstein graciously giving me an account
> on his AMD64. I have some questions about type sizes.
>
> Please answer only with respect to the GNU/Linux architectures supported by
> Debian, and the gcc/g77 compilers. (I.e., if Joe's custom-built
> one-of-a-kind chip design running "joecc" is a counterexample, I don't care.)
>
>
> 1) Is it true that sizeof(long) == sizeof(void *) on all arches?
> 2) Is it true that sizeof(int) == sizeof(Fortran INTEGER), when the
> precision or KIND of INTEGER is not specified, on all arches?
> 3) Is it true that sizeof(int) == sizeof(long), on all *32-bit* arches?
> 4) Is it true that sizeof(int) < sizeof(long), on all *64-bit* arches?
>
>
> Thanks in advance for responses,
Normaly thats what your configure script is for.
Or just use <stdint.h> and then int32_t, int64_t, intptr_t, ....
MfG
Goswin
Reply to: