Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.6: \"u\" Suffix to all unsigned constants
#2
I am also interested in this rule.

Code:
#define BIT0    0x0001

I take from the wording of the rule that a 'U' suffix needs to be applied in this case.

Also

Code:
uint32_t x=1U;
uint32_t y;

y=x+(uint32_t)1; /*Cast instead of 'U' */

Is this compliant. The U suffix has not been used but isnt this the same?


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)