MCU chc08, C99, MISRA-2012 compliance?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCU chc08, C99, MISRA-2012 compliance?

1,242 Views
makulik
Contributor I

I have a project using the MCU chc08 compiler analyzed with a static analysis tool for checking MISRA-2012 compliance. One of the top hit rule violations comes up from some CodeWarrior generated code itself in the IO_map.c module complaining about usage of unsigned char (i.e. uint8_t) for declaration of bitset types (only un-/signed int/long/enum types are allowed as underlying types for ANSI-C/C98).

The compiler documentation is a bit unclear about this particular point, and what chc08 implementation will generate for them. As it is, it all reads a bit contradictory for me.

Does this version support using 'unsigned char' as underlying type for bitsets as they are used to interface the MCU registers, despite what it's telling about it's general ANSI-C(C98)/C99 support??

I would be happy to leave out this rule as not relevant for this compiler!

Labels (1)
3 Replies

839 Views
w_tension
Contributor III

I have a same question, Is C99 or GNU C extension supported?

0 Kudos

839 Views
BlackNight
NXP Employee
NXP Employee

The chc08 does not support C99 or GNU extensions.

Erich

839 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

the CW development tool follows MISRA-C:2004. see attached document

0 Kudos