Declaring fixed-size integer typedef in Standard C

前端 未结 5 1299
谎友^
谎友^ 2021-01-13 08:28

Is there a reliable way to declare typedefs for integer types of fixed 8,16,32, and 64 bit length in ISO Standard C?

When I say ISO Standard C, I mean that strictly:

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-13 08:54

    Strictly speaking, ISO 9899:1999 superceded ISO 9899:1990 so is the only current ISO standard C language specification.

    As exact width typedef names for integer types were only introduced into the standard in the 1999 version, what you want is not possible using only the 1990 version of the standard.

提交回复
热议问题