It was a work computer, but I know it ran native 64-bit apps. It may have been a 32-bit gcc install though. Tom Joerg Arndt writes:
* Tom Karzes <karzes@sonic.net> [Mar 29. 2014 12:05]:
On 64-bit Linux systems I think it can depend on the installation. I have used gcc on a 64-bit Linux PC where "long" was still just 32 bits (which I hadn't expected).
You grabbed a 32 bit version (the CPU then runs in 32 bit mode).
There should really be a warning like "You are about to install a 32 bit version of Linux. A 64 bit version is available as well. (...)" But apparently no distro does this.
I agree that it makes more sense for it to be 64 bits on a 64-bit platform, but I don't think you can depend on that.
For general purpose CPUs I am only aware of Windoze doing the silly thing (apparently in order to be able to compile their software without cleaning the source code).
I think it's generally preferred to include <stdint.h>, then use uint64_t for unsigned 64-bit integers. There's also uint_least64_t (small, >= 64 bits) and uint_fast64_t (fast, >= 64 bits).
Yes.
Tom
Best regards, jj
[...]