Is there a real platform / compiler compilation that defines int64 bits? Or is it just used to scare new programmers like me into using int32_twhere size matters (like saving to a file) to make it "portable"?
int
int32_t
Absolutely such systems. There may be more (or may not be) in the future. And you want to bet on what intwill happen on a possible 128-bit architecture?
Wikipedia has an incomplete but useful summary: http://en.wikipedia.org/wiki/64-bit#64-bit_data_models
, c99 long long 64 . gcc microsoft .
long long
http://jk-technology.com/c/inttypes.html#long_long
, 64- IRIX SGI, , long 64- , -n32 32- . Sun long long, 64 , long 32 . Apple Macintosh int 16 . , , char - 16 DSP DSP.
long
-n32
char
long long ( ), C. , , <stdint.h> - . .
<stdint.h>
, 64- ints.
ints
An int ( 64- 64- ints, 16- 16 ints ..).
int32_t, , 32 , , , . int32_t 64- , , - . int , . RISC.
If you want your code to be portable, you might want to keep 64-bit values ββfor a long time.