3 ms·
Yes. ssize_t is signed.
by swinglock 6y ago
Yes. ssize_t is signed.
- moonchild 6y agossize_t should never be used. It's not guaranteed to have a full negative range, only to be able to represent -1. Use ptrdiff_t as a signed size type.
- AbacusAvenger 6y agoOut of curiosity, do you know of any implementations where ssize_t has that kind of range limitation?
- moonchild 6y agoNope. But I do know of at least one implementation where it's not present at all—msvcrt. ssize_t isn't specified in the c standard, it's part of posix. ptrdiff_t is standard.