Re: sizeof(int) in 64-bit C compilers

Larry Rau <larryr@cybergate.com>
18 Dec 1995 22:06:13 -0500

          From comp.compilers

Related articles
sizeof(int) in 64-bit C compilers d.sand@ix.netcom.com (1995-12-17)
Re: sizeof(int) in 64-bit C compilers ganswijk@xs4all.nl (Jaap van Ganswijk) (1995-12-18)
Re: sizeof(int) in 64-bit C compilers larryr@cybergate.com (Larry Rau) (1995-12-18)
Re: sizeof(int) in 64-bit C compilers streich@roo.mti.sgi.com (1995-12-19)
Re: sizeof(int) in 64-bit C compilers d.sand@ix.netcom.com (1995-12-19)
Re: sizeof(int) in 64-bit C compilers kennell@cs.purdue.edu (Richard L. Kennell) (1995-12-19)
Re: sizeof(int) in 64-bit C compilers karsten@tdr.dk (1995-12-28)
Re: sizeof(int) in 64-bit C compilers anton@complang.tuwien.ac.at (1995-12-28)
| List of all articles for this month |

From: Larry Rau <larryr@cybergate.com>
Newsgroups: comp.compilers
Date: 18 Dec 1995 22:06:13 -0500
Organization: My Own Organization
References: 95-12-094
Keywords: architecture

Duane Sand wrote:
> A number of machines now support 32-bit and 64-bit addressing equally
> well, and some even have suitable C compilers that support both forms
> of programs. I would like to know which of these compilers have
> defined "int" to be 64-bits in their 64-bit-pointer codegen model, and
> which compilers have kept "int" as 32-bits as in their 32-bit-pointer
> model. ...


I know DEC's Alpha OSF compilers defined sizeof(int)==32 and
sizeof(long)==64. They also had a link option which foreced all
"data" to be available within the 32 bit range. This proved to be not
too useful -- pointers were still 64bit they just contained values
which were in a 32bit range. I was supposed to be useful for porting
but I found it usually just masked errors until later. They also, I
believe, did modify their compilers in a later release to actually
generate "32bit code" where pointers were really 32bit quantities, but
I never used that compiler and could be wrong??


HaL chose to make sizeof(int)==sizeof(long)==sizeof(void*)==64 -- HaL
has makes a Sparc v9 (64bit) machine running a 64-bit version of
Solaris. Sun has their 64bit Sparc out but their OS is not full
64-bit.


...............larry
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.