Literal types: 0x1ull vs 0x1llu

前端 未结 3 1913
感动是毒
感动是毒 2021-01-18 10:30

My gcc compiler allows me to define an unsigned long long (i.e. 64-bit) literal as

#define A_LITERAL 0x1ull

--- or ---

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 10:44

    Both are allowed by the C standard (section 6.4.4.1).

    The unsigned suffix u can be before or after the long l (or long long (ll)) suffix.

提交回复
热议问题