Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Doubts on underlying type of integer constant expressions.
#2
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.
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)