16-07-2010, 03:41 PM
That is correct - the initialiser must have an unsigned type and a 'U' suffix is a neat way to do this for literals.
There are other ways of achieving the same effect too, for example:
There are other ways of achieving the same effect too, for example:
Code:
unsigned u = (unsigned)0;
Posted by and on behalf of the MISRA C Working Group