※ 引述《Tiberius.bbs@bbs.cs.nchu.edu.tw (渴望平凡的幸福)》之銘言:
: http://en.wikipedia.org/wiki/64-bit#64-bit_data_models
: 底下有提到 LP64, ILP64 與 LLP64 幾種常見的模型 ...
microsoft 是用 LLP64,
也就是 long, int 都是 32 bit,
要用 64bit, 就用 long long 之類的.
一般用的是 LP64 (including Solaris, AIX, HP, Linux, MacOS native compilers)
也就是 long 是 64 bit, int 是 32 bit,
而 ILP64, 把 int 也當 64 bit 的,
例子裏也沒有.
跟我之前的post是完全一致...
只是 gcc 可以允許只用 option 去改變 defaut 的行為...
例如用 -mint64, 設成 ILP64.
--
※ Origin: 臺大電機 Maxwell 站 ◆ From: 249.123.217.203.static.tcol.com.tw