jump to navigation

c-faq review and a chinese translation (1.4) January 24, 2007

Posted by TSAI HONG-BIN in Programming.
trackback

plz refer to http://c-faq.com/decl/octabyte.html

1.4 What should the 64-bit type be on a machine that can support it?

The new C99 Standard specifies type long long as effectively being at least 64 bits, and this type has been implemented by a number of compilers for some time. (Others have implemented extensions such as __longlong.) On the other hand, it’s also appropriate to implement type short int as 16, int as 32, and long int as 64 bits, and some compilers do.See also questions 1.3 and 18.15d.

Additional links: Part of a proposal for long long for C9X by Alan Watson and Jutta Degener, succinctly outlining the arguments.

References: C9X Sec. 5.2.4.2.1, Sec. 6.1.2.5

為什麼機器應該要可以支援 64 位元的型態

新的C99標準定義 long long 為有效的 (至少) 64 位元,而這個型態也已被很多編譯器所包含。(其他的則實作延伸型態如 __longlong) 另一方面來說,實作 short int 16 bitsint 32 bitslong int 64 bits也比較適合,而某些編譯器也的確這麼做。

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: