C2309
应使用表示了大小和符号性的类型定义(typedef)代替基本数据类型
Category: Advisory
Decidability: Undecidable
说明
不应使用 char 、 short 、 int 、 long 、 long long 、 float 、 double 和 long double 这些基本数据类型,而应该使用指定了长度的 类型定义 ( typedef )。 其中 char 的数据类型是 有符号的和无符号的char ,而“纯粹的” char不被视为数据类型(见C4203 基本字符类型 )。
C99和后续C语言应使用<stdint.h>
所提供的类型;C90应定义和使用与其等价的类型。