What is the difference between ssize_t and ptrdiff_t?

前端 未结 2 471
眼角桃花
眼角桃花 2020-12-09 14:47

The C standard (ISO/IEC 9899:2011 or 9899:1999) defines a type ptrdiff_t in .

The POSIX standard (ISO/IEC 9945; IEEE Std 10

2条回答
  •  攒了一身酷
    2020-12-09 15:20

    Is there an implementation where the underlying base type for ssize_t is not the same as for ptrdiff_t?

    x86-16 with the large memory model. Pointers are far (32-bit), but individual objects are limited to one segment (so size_t is allowed to be 16-bit).

提交回复
热议问题