Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the essential type of -123L?
#1
When applying the essential type model, what is the essential type of "-123L"?
Posted by and on behalf of the MISRA C Working Group
Reply
#2
The last paragraph of section D.1 states that sections D.2 – D.7 only apply to expressions whose standard C type is "signed int" or"unsigned int".

The standard type of the expression “-123L” is "signed long", and hence the essential type is also "signed long".
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)