Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Essential type of constant expressions
#1
In MISRA-C:2012, it is stated that the essential type of the constant expression ~(unsigned short)3 is the UTLR of its value (i.e., -4), but the definition of UTLR seems not to cover this case (that is, the UTLR of -4 is undefined).

Another similar example is (unsigned char)3 - (unsigned char)4.

What is the essential type of these constant expressions?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)