Thread with 9 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
@hikari long was a mistake, which later necessitated the creation of long long
@rcombs well, short was definitely also a mistake, then
@hikari nah short is sane, it's 16-bit on all common desktop/server/etc platforms
@rcombs but int being short or long depending on the platform makes me sad and has broken so much
@hikari where is int = short, outside embedded? (like, for the most part these days it's neither on 64-bit even?)
@rcombs I mean yes we live in the 32-bit era now so desktops, laptops, phones and serversโ CPUs have sizeof(int) == 4, but embedded is a thing, and legacy OSes were a thing, and if you try to port legacy code to a modern OS youโll suffer :p
@hikari oh if you find yourself porting pre-32-bit code to post-32-bit platforms then you have my sincerest condolences