Re: Moving from C++ to VC++



Carl Daniel [VC++ MVP] <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx> wrote:
> [...]
> The fact is, very few applications will ever need to use a 64-bit integer
> type, even fewer will need a 128-bit integer. Breaking compatibility with
> untold scores of current programs to favor those very few future programs
> that need the larger type just doesn't make sense. Those few programs that
> do need that large integer size can simply use __int64 (or int_t<64>, or
> whatever other new integer types we may see in C++ in the future).
>
> The legitimate, common uses I can see for a 64 bit integer type involve
> representation of values of or differences between 64 bit pointers, and we
> have size_t and prtdiff_t for that (and yes, they're both 64 bits on 64 bit
> Windows).

One would assume (that is, I would anyway) the
native integer size on a 64bit platform to be
64bit. AFAIK, according to the C/C++ standards,
even 'int' should be 64bit then. I agree that
the usefulness of this is at least debatable.
(Even though I would prefer 'int' to be the
native integer type of the platform. If you need
less than that, use 'short' or 'int32_t' or
whatever.)
But I really don't see any excuse for not making
'long' 64bit on a 64bit platform.

> -cd

Schobi

--
SpamTrap@xxxxxx is never read
I'm Schobi at suespammers dot org

"Coming back to where you started is not the same as never leaving"
Terry Pratchett


.



Relevant Pages

  • Re: Moving from C++ to VC++
    ... >> even 'int' should be 64bit then. ... >> native integer type of the platform. ... The absurdity here is that you cannot even write portable code at all, ...
    (microsoft.public.vc.language)
  • Re: Moving from C++ to VC++
    ... > even 'int' should be 64bit then. ... > native integer type of the platform. ... you have no business using the native ...
    (microsoft.public.vc.language)
  • Re: Moving from C++ to VC++
    ... > doesn't have to be wider than an int - it just can't be narrower. ... of the underlying platform. ... How about fixing faulty code now, ... I'm Schobi at suespammers dot org ...
    (microsoft.public.vc.language)
  • Re: Moving from C++ to VC++
    ... If it is the longest integer. ... platform, I want the longest integer type ... Now /I/ would like to have 'int' being the ... Adhering to what computing standards' intention ...
    (microsoft.public.vc.language)
  • Re: I2C bus implementation (for MPC82xx)
    ... > PowerMac (see the patches that just went in rewriting the PowerMac i2c ... > smbus API, but then, do you really want to use an existing i2c driver? ... For the resources I have used platform definition. ... +static int ...
    (Linux-Kernel)

Loading