Re: Is __int64 dead?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx> wrote in message news:Oo9lAnq5HHA.1208@xxxxxxxxxxxxxxxxxxxxxxx

I would expect Microsoft to continue to support __int64 whether it's considered part of the ANSI standard or not.

For my personal tastes, I see long long int, and think something along the lines of "now, what size is int on this platform? And so what size is the long? And what does that make long int, and long long int?" If I need a 64-bit data types regardless of the platform I'm compiling to, I use __int64.

I use __int64 a lot too. I have a need for something to hold a set of 64 bit flags in a number of places.

unsigned __int64 does the job.

I also occasionally use unsigned __int32 __int16 and __int8 where the number of bits is important to me. If they weren't there, I'd use DWORD WORD and BYTE (as I do in other contexts), but IIRC those are Microsoft specific too.

Come to think of it - does C++ define *any* types which are guaranteed to be a fixed number of bytes on ALL platforms?

Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm






.



Relevant Pages

  • Re: Proposal: New types in C++0x
    ... > is unsigned int16 to be the same as unsigned int and unsigned, ... > and unsigned int64 is the unsigned type. ... If, for example, there exists a platform that ... then replacing int's representation with a 16 bit representation would break ...
    (comp.lang.cpp)
  • 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)
  • Re: Using OleDBParameter in a simple UPDATE statement
    ... apparently the SQL commands via the .NET OleDb objects w/MySQL are required ... Actually that is specific to the underlying database you are ... Also you might already know this, but an int to one ... > platform might be not an int some other platform. ...
    (microsoft.public.dotnet.framework.adonet)
  • [PATCH v2 9/10] x86/apic: RFC decouple legacy irq handling in ioapic
    ... This patch uses platform feature flags to separate i8259/PIC from ioapic. ... unsigned int num_processors; ...
    (Linux-Kernel)