Skip to main content

IAR Embedded Workbench for RH850 3.20.x

MISRAC2012-Dir-4.6_b

In this section:
Synopsis

(Advisory) typedefs that indicate size and signedness should be used in place of the basic numerical types

Enabled by default

No

Severity/Certainty

Low/High

lowhigh.png
Full description

Typedefs of basic types were found with names that do not indicate the size or signedness.

Coding standards
MISRA C:2012 Dir-4.6

(Advisory) typedefs that indicate size and signedness should be used in place of the basic numerical types

Code examples

The following code example fails the check and will give a warning:

/* MISRA C 2012 Directive 4.6 Example */

/* Non-compliant - no sign or size specified                         */
typedef int speed_t;

The following code example passes the check and will not give a warning about this issue:

/* MISRA C 2012 Directive 4.6 Example */

/* Compliant     - int used to define specific-length type           */
typedef int SINT_16;