On Fri, Mar 5, 2010 at 12:20 AM, Jim Michaels <[email protected]> wrote: > in MSVC, > __int64 x=12345678901234567i64; > > point 1: this type __int64 doesn't require me to #include <windows> to > define it. in mingw and mingw-w64, one must #include <basetsd.h>. why?
It is enough, I guess.. Include windows.h if you want, why is that a problem? > > point 2: there are also __int32 __int16 and __int8 types. > MinGW has them all of as macros, because : - gcc doesn't have native support for them - and for some compatibility issues. > point 3: mingw does not utilize the i64 constant thingy (whatever it's > called) that tells the compiler that this number is of __int64 type. I do > not know if there is an i32 or i16 or i8 definition. Not mingw, but GCC doesn't support those suffixes. I suggest: #include <stdint.h> __int64 x=INT64_C(12345678901234567); Yeah, msvc doesn't have stdint.h, inttypes.h, but you can get msvc-compatible versions of them from http://msinttypes.googlecode.com/ > > > BTW, 128-bit number type is in the C9X standard. the new integral data > types in C++ will be something like int64, int32, int128, int16, int8. > > http://www.open-std.org/JTC1/sc22/wg14/www/docs/n615.htm > Hmm, mingw-w64 has an __int128 as a typedef. If it goes as planned, gcc-4.6 will have that natively in future. > Jim Michaels > [email protected](main) -- Ozkan ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
