-32768 not fitting into a 16 bit signed value

前端 未结 4 1011
轻奢々
轻奢々 2021-01-23 15:40

I am using PCLint v 9.00h

In my code I have the following (where S16 is a signed 16 bit):

S16 temperatureResult = -32768;

Which unless

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-23 15:41

    The standard only guarantees the range of [-32767,32767] for signed short. Your implementation may extend this a bit, like most implementations do, but PCLint checks for standards compliance.

提交回复
热议问题