Re: Integers on 64-bit machines

napi <napi@axiomsol.com>
Fri, 13 Jul 2007 17:32:07 -0700

          From comp.compilers

Related articles
[17 earlier articles]
Re: Integers on 64-bit machines torbenm@app-6.diku.dk (2007-07-09)
Re: Integers on 64-bit machines gneuner2@comcast.net (George Neuner) (2007-07-09)
Re: Integers on 64-bit machines dot@dotat.at (Tony Finch) (2007-07-09)
Re: Integers on 64-bit machines marcov@stack.nl (Marco van de Voort) (2007-07-10)
Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-13)
Re: Integers on 64-bit machines cfc@shell01.TheWorld.com (Chris F Clark) (2007-07-13)
Re: Integers on 64-bit machines napi@axiomsol.com (napi) (2007-07-13)
Re: Integers on 64-bit machines monnier@iro.umontreal.ca (Stefan Monnier) (2007-07-14)
Re: Integers on 64-bit machines gneuner2@comcast.net (George Neuner) (2007-07-16)
Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-19)
Re: Integers on 64-bit machines gneuner2@comcast.net (George Neuner) (2007-07-19)
| List of all articles for this month |
From: napi <napi@axiomsol.com>
Newsgroups: comp.compilers
Date: Fri, 13 Jul 2007 17:32:07 -0700
Organization: Compilers Central
References: 07-07-007
Keywords: arithmetic, design
Posted-Date: 15 Jul 2007 16:29:40 EDT

On Jul 2, 11:43 pm, Denis Washington <dwashing...@gmx.net> wrote:
> Hello,
>
> I'm currently developing a little C-like programming language as a
> hobby project. After having implemented the basic integral integer
> types like known from Java/C# (with fixed sizes for each type), I
> thought a bit about 64-bit machines and wanted to ask: if you develop
> on a 64-bit machine, would it be preferable to still leave the
> standard integer type ("int") 32-bit, or would it be better to have
> "int" grow to 64 bit? In this case, I could have an
> architecture-dependent "int" type along with fixed-sized types like
> "int8", "int16", "int32" etc.


IMHO for 32-bit architecture upwards I would make "int" to be fixed to
32 bits long for practicality. Then you can have "int8", "int16",
"int32", "int64", "int128", etc.


This is due to the fact that since ANSI C 1989 (ISO C 1990) came out
most C compiler implementations for 32-bit machines for "int" have
been 32 bits for about two decades; and overwhelming number of
applications have been written with that in mind. Although 64-bit
architectures were available at the time, but it was not nearly as
common as 32-bit architectures until recently.


But, finally it's up to you :-)


Regards.


Napi


Post a followup to this message

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