From: Mattias Flodin (flodin_at_[hidden])
Date: 2002-09-25 16:51:36
On Wed, Sep 25, 2002 at 03:30:24PM -0400, Jeffrey C. Jacobs wrote:
> Actually, the MSVC++ compiler considers __int<x> as separate types from int,
> long, etc. (having checked the name mangling -- what a mess they make of
> specializations with these MS-types!!).
If I recall correctly, in VC6 the various __intX types were not
distinct. That is, they were treated as if they were all the same type.
In VC7, however, the documentation says:
"The types __int8, __int16, and __int32 are synonyms for the ANSI
types that have the same size, and are useful for writing portable
code that behaves identically across multiple platforms. The __int8
data type is synonymous with type char, __int16 is synonymous with
type short, and __int32 is synonymous with type int. The __int64 type
has no ANSI equivalent."
The way I interpret this, __int32 is indeed the same type as int - in
VC7 at least, but probably not VC6.
(I do wonder where they got this idea about using __intX types for
"writing portable code that behaves identically across multiple
platforms", however :)
-- Mattias Flodin <flodin_at_[hidden]> - http://www.cs.umu.se/~flodin/ Room NADV 102 Department of Computing Science Umeå University S-901 87 Umeå, Sweden -- "The WM_NULL message performs no operation. An application sends the WM_NULL message if it wants to post a message that the recipient window will ignore." -- Microsoft Platform SDK documentation
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk