Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Underlying Type Presumptions
#1
I have made some presumptions regarding the MISRA 2004 concept of Underlying Type. Do correct me if I am wrong in these presumptions.

1. Explicit casts change an expression's underlying type
2. The Standard is not concerned with an expression's underlying type if any of its sub-expressions violate a required underlying type-related rule
3. Implicitly converting an expression (excluding promotions) change its underlying type
4. Effectively Boolean expressions have underlying type of int (see commentary in MISRA 2004, 6.10.2)
5. Enums and enumerations constants have underlying type of int (see C90 Standard, Clause 3, Section 1, Sub-section 3, Part 3)

Does anyone see a problem with any of these?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)