Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
5-0-3: Meaning of "implicitly converted to a different underlying type"
#2
The purpose of the underlying type rules is to remove the dependency on 'usual arithmethic conversions' and other asymmetrical type behaviours defined in the standard, and to impose a uniform interpretation of arithmetic. Hence s64 = s32 + s32; is non-compliant by analogy with Example 1

According to the current rules, 0L == s32+s32 is compliant (0L is signed char, not a cvalue and can be converted to s32)
Posted by and on behalf of
the MISRA C++ Working Group
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)