[Bug c/127127] Provide built-in macro __SSIZE_TYPE__ for ssize_t

gjl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Aug 31 09:40:55 GMT 2026


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127127

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> typedef signed __SIZE_TYPE__ ssize_t;
Not when size_t carries "unsigned":

error: both 'signed' and 'unsigned' in declaration specifiers
   1 | typedef signed __SIZE_TYPE__ ssize_t;

Preprocessed:

typedef signed unsigned int ssize_t;

Now I am unsure, ssize_t is not C but only POSIX.

And maybe ssize_t is wider than size_t?


More information about the Gcc-bugs mailing list