10-04-2019, 01:48 PM
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)
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
the MISRA C++ Working Group