RSIZE_MAXAuthors: Jay Ghiron
Date: 2026-09-25
Submitted against: C23
Status: Open
The macro is
RSIZE_MAXwhich expands to a value of type
size_t. It can be an expression that is not constant.
(C23 K.3.4 "Integer types <stdint.h>" paragraph 2.)
Does "not constant" mean that throughout a program execution, the
value of RSIZE_MAX can change?
Was it intended that there is no minimum value for RSIZE_MAX? There
does not appear to be anything forbidding a value of zero.
Currently, it seems like RSIZE_MAX may be arbitrarily changed to any
value including to zero at any point in time. Therefore any usage of
an Annex K function that forbids sizes in bytes greater RSIZE_MAX
may fail unless the size used is zero.