Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.6: \"u\" Suffix to all unsigned constants
#4
MISRA-C meeting 23-8-2006

From page 43

Code:
... u8a + 5                           /* not compliant */
    ... u8a + 5U                         /* compliant     */
    ... u8a + (uint8_t)5               /* compliant     */

Either casting or use of U is acceptable.
Posted by and on behalf of the MISRA C Working Group


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)