Thread with 7 posts
jump to expanded poston x64 Linux, uint64_t is an alias of unsigned long, but on x64 macOS, uint64_t is an alias of unsigned long long. this doesn’t matter for C code, but it interacts badly with C++ overload resolution, even though sizeof(long) == sizeof(long long) on both systems. fun!
long long was a mistake
…I said “this doesn’t matter for C code”, but the way I tested this was with the _Generic macro (https://godbolt.org/z/v3c4n56jj), which is a C feature. also, you might be using really anal compiler flags…
ok are you ready for this? my hottest c take
int should be 64-bit on 64-bit platforms
@hikari If you use Swift you can enjoy its ILP64 goodness
@saagar this is because of NSInteger isn't it? Objective-C is the only good C
@hikari Maybe, but also that ILP64 is typically advantageous for compiler optimizations