Dir 4.6 Does "plain char" need to be typedeffed

Moderators: misra-c, david ward

misra-c
Posts: 547
Joined: Thu Jan 05, 2006 1:11 pm

Dir 4.6 Does "plain char" need to be typedeffed

Postby misra-c » Wed Dec 18, 2013 2:48 pm

---
Posted by and on behalf of
the MISRA C Working Group

misra-c
Posts: 547
Joined: Thu Jan 05, 2006 1:11 pm

Re: Dir 4.6 Does "plain char" need to be typedeffed

Postby misra-c » Wed Dec 18, 2013 2:50 pm

The numerical types of “char” are “signed char” and “unsigned char”. Plain ”char” is not considered a numerical type by this directive.

It is fine to use the basic type of “char” for handling character values. This is referred to as the “essentially character” type in Appendix D. Likewise the C99 _Bool type is not a numerical type for the purposes of this directive.

It should be noted that "Exception 4" in the guidelines should not be listed as an exception but as a note as it refers to plain “char”.
---
Posted by and on behalf of
the MISRA C Working Group


Return to “7.4 Code design”

Who is online

Users browsing this forum: No registered users and 1 guest