3 ms·
I understand some implementations might break this rule, but what standard states this?
by vortico 10y ago
I understand some implementations might break this rule, but what standard states this?
- jcranmer 10y ago(Derived from C11, specifically N1570). §5.2.4.2.1 CHAR_BIT is at least 8 USHRT_MAX is at least 2^16 - 1 UINT_MAX is at least 2^16 - 1 ULONG_MAX is at least 2^32 - 1 ULLONG_MAX is at least 2^64 - 1 §6.2.5p8 guarantees that integers of increasing conversion ranks obeys subset relations, and §6.3.1.1 lays out that short, int, and long have conversion ranks in that order. Thus, sizeof(char) = 1 ≤ sizeof(short) ≤ sizeof(int) ≤ sizeof(long) ≤ sizeof(long long).
- loeg 10y agoAll of these were present in C99 as well.
- deleted 10y ago[deleted]