05-10-2015, 01:57 PM
Question 1:
The underlying type of "RED + 1" is the enum type. The comment on Page 60 does not apply to enums.
Question 2:
The underlying type of "1L" is indeed signed char. We will consider changing this to improve compatibility with MISRA C:2012.
Question 3:
The underlying type of "1UL" is unsigned char, so "-1UL" violates Rule 5-3-2.
The underlying type of "RED + 1" is the enum type. The comment on Page 60 does not apply to enums.
Question 2:
The underlying type of "1L" is indeed signed char. We will consider changing this to improve compatibility with MISRA C:2012.
Question 3:
The underlying type of "1UL" is unsigned char, so "-1UL" violates Rule 5-3-2.
Posted by and on behalf of
the MISRA C++ Working Group
the MISRA C++ Working Group