6.1, 6.2 and casts?

6.6 Types

Moderators: misra-c, david ward

Post Reply
gs
Posts: 87
Joined: Thu Nov 18, 2004 1:39 am

6.1, 6.2 and casts?

Post by gs » Thu Mar 18, 2010 2:31 pm

Does rule 6.1 permit a numeric value to be cast to plain char type and then assigned to an object of plain char?
Does rule 6.2 permit a character value to be cast to signed/unsigned char type and then assigned to an object of signed/unsigned char?

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

Re: 6.1, 6.2 and casts?

Post by misra-c » Thu May 13, 2010 10:15 am

Yes, both of these are permitted.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “6.6 Types”