Legend:
Standard behavior | |
Standard and a grateful surprise: other compilers/platforms fail | |
Standard but be careful: different from everywhere else | |
Unexpected: probably a compiler bug or missing feature |
Platforms \ Types | char | short | int | size_t | ssize_t | long | long long | void* | off_t | float | double |
Win32, gcc nuwen 7.2 | 8 | 16 | 32 | 32 | 32 | 32 | 64 | 32 | 32 | 32 | 64 |
Win32, gcc nuwen 7.2 LFF | 8 | 16 | 32 | 32 | 32 | 32 | 64 | 32 | 32 | 32 | 64 |
Win32, MSVC | 8 | 16 | 32 | 32 | - | 32 | 64 | 32 | 32 | 32 | 64 |
Linux32, gcc | 8 | 16 | 32 | 32 | 32 | 32 | 64 | 32 | 32 | 32 | 64 |
Linux32, gcc LFF | 8 | 16 | 32 | 32 | 32 | 32 | 64 | 32 | 64 | 32 | 64 |
Win64, gcc mingw64 | 8 | 16 | 32 | 64 | 64 | 32 | 64 | 64 | 32 | 32 | 64 |
Win64, gcc mingw64 LFF | 8 | 16 | 32 | 64 | 64 | 32 | 64 | 64 | 64 | 32 | 64 |
Win64, MSVC | 8 | 16 | 32 | 64 | - | 32 | 64 | 64 | 32 | 32 | 64 |
Linux64, gcc | 8 | 16 | 32 | 64 | 64 | 64 | 64 | 64 | 64 | 32 | 64 |
Linux64, gcc LFF | 8 | 16 | 32 | 64 | 64 | 64 | 64 | 64 | 64 | 32 | 64 |
C:\arisnova\zsync\blah\typesize\mingw-build>sizes.exe
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 32 bits (MAX VALUE: size_t = 536870911
ssize_t size: 32 bits (MAX VALUE: ssize_t = 1073741823
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 32 bits
off_t size: 32 bits
float size: 32 bits
double size: 64 bits
C:\arisnova\zsync\blah\typesize\mingw-build>sizes
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 32 bits (MAX VALUE: size_t = 536870911
ssize_t size: 32 bits (MAX VALUE: ssize_t = 1073741823
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 32 bits
off_t size: 32 bits
float size: 32 bits
double size: 64 bits
, therefore an alternative mechanism for large file support is required
C:\arisnova\zsync\blah\typesize\mingw64-build>sizes.exe
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 64 bits (MAX VALUE: size_t = 144115188075855871
ssize_t size: 64 bits (MAX VALUE: ssize_t = 288230376151711743
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 64 bits
off_t size: 32 bits
float size: 32 bits
double size: 64 bits
C:\arisnova\zsync\blah\typesize\mingw64-build>sizes.exe
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 64 bits (MAX VALUE: size_t = 144115188075855871
ssize_t size: 64 bits (MAX VALUE: ssize_t = 288230376151711743
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 64 bits
off_t size: 64 bits
float size: 32 bits
double size: 64 bits
C:\arisnova\zsync\blah\typesize\msvc-build\Debug>sizes.exe
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 32 bits (MAX VALUE: size_t = 536870911
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 32 bits
off_t size: 32 bits
float size: 32 bits
double size: 64 bits
C:\arisnova\zsync\blah\typesize\msvc64-build\Debug>sizes.exe
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 64 bits (MAX VALUE: size_t = 144115188075855871
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 64 bits
off_t size: 32 bits
float size: 32 bits
double size: 64 bits
pgquiles@mcpau:~/tmp$ ./sizes
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 32 bits (MAX VALUE: size_t = 536870911
ssize_t size: 32 bits (MAX VALUE: ssize_t = 1073741823
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 32 bits
off_t size: 32 bits
float size: 32 bits
double size: 64 bits
pgquiles@sid32:~/typesize/build-linux64$ ./sizes
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 32 bits (MAX VALUE: size_t = 536870911
ssize_t size: 32 bits (MAX VALUE: ssize_t = 1073741823
long size: 32 bits (MAX VALUE: signed long = 536870911, unsigned long = 1073741823)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 1073741823)
void* size: 32 bits
off_t size: 64 bits
float size: 32 bits
double size: 64 bits
pgquiles@nattyserver:~/a$ ./sizes
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 64 bits (MAX VALUE: size_t = 144115188075855871
ssize_t size: 64 bits (MAX VALUE: ssize_t = 288230376151711743
long size: 64 bits (MAX VALUE: signed long = 144115188075855871, unsigned long = 288230376151711743)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 288230376151711743)
void* size: 64 bits
off_t size: 64 bits
float size: 32 bits
double size: 64 bits
pgquiles@nattyserver:~/typesize/build-linux$ ./sizes
char size: 8 bits (MAX VALUE: signed char = 255, unsigned char = 511)
short size: 16 bits (MAX VALUE: signed short = 32767, unsigned short = 65535)
int size: 32 bits (MAX VALUE: signed int = 536870911, unsigned int = 1073741823)
size_t size: 64 bits (MAX VALUE: size_t = 144115188075855871
ssize_t size: 64 bits (MAX VALUE: ssize_t = 288230376151711743
long size: 64 bits (MAX VALUE: signed long = 144115188075855871, unsigned long = 288230376151711743)
long long size: 64 bits (MAX VALUE: signed long long = 144115188075855871, unsigned long long = 288230376151711743)
void* size: 64 bits
off_t size: 64 bits
float size: 32 bits
double size: 64 bits