Main Content

Group 3: Type definitions

The custom rules 3.x in Polyspace® enforce naming conventions for typedef aliases.

For information on how to enable these rules, see Check custom rules (-custom-rules).

NumberRuleDetails
3.1All integer type aliases must follow the specified pattern.

Applies to integer and Boolean types specified by typedef statements. For example:

  • typedef signed long int64_t;

  • typedef int64_t sLong_t;

Does not apply to enumeration types.

3.2All float type aliases must follow the specified pattern.

Applies to double and float types specified by typedef statements. For example:

  • typedef double float64_t;

  • typedef float64_t Lfloat;

3.3All pointer type aliases must follow the specified pattern.

Applies to pointer types specified by typedef statements. For example:

  • typedef int* p_int;

  • typedef p_int int_;

3.4All array type aliases must follow the specified pattern.

Applies to array types specified by typedef statements. For example:

  • typedef int a_int_3[3];

  • typedef int3_arr in3af[3];

3.5All function pointer type aliases must follow the specified pattern.

Applies to function pointer types specified by typedef statements. For example:

  • typedef void (*func_fp) (int);

  • typedef func_fp funcc;