> > I am in the process of moving some code onto a 64-bit=20
> > machine. In order to keep the code portable I thought I could=20
> > use SELECTED_INT_KIND, say, to detect whether I was on a=20
> > 32-bit or 64-bit platform.=20
>
> This is a common misunderstanding. The "64-bit" nature of a processor
> architecture usually referrs to the size of a memory address, not any
> numerical datatype.
Right, and this affects things like maximum values in the file system,
size of a process etc. It can also refer to the register size.
> Such processors may indeed have hardware support
> for a 64-bit integer, but many compilers on 32-bit platforms support
> 64-bit integers as well. More to the point, the default "kind" for
> integers and reals do NOT necessarily change when moving from a 32-bit
> architecture to a 64-bit architecture - another common misconception is
> that they do.
Perhaps fueled by the fact that for a long time, one of the most common
(if one can call such a beast "common") 64-bit platforms was the Cray,
where REAL was by default 64 bits.
|