What is the essential type of -123L?

Moderators: misra-c, david ward

Post Reply
misra-c
Posts: 566
Joined: Thu Jan 05, 2006 1:11 pm

What is the essential type of -123L?

Post by misra-c » Tue Feb 17, 2015 1:26 pm

When applying the essential type model, what is the essential type of "-123L"?
---
Posted by and on behalf of
the MISRA C Working Group

misra-c
Posts: 566
Joined: Thu Jan 05, 2006 1:11 pm

Re: What is the essential type of -123L?

Post by misra-c » Tue Feb 17, 2015 1:28 pm

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

Post Reply

Return to “8.10 The essential type model”