MCU chc08, C99, MISRA-2012 compliance?

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

MCU chc08, C99, MISRA-2012 compliance?

788 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)
Tags (3)
0 Kudos
1 Reply

658 Views
ZhangJennie
NXP TechSupport
NXP TechSupport
0 Kudos