Maximum size of size_t

The standard says that SIZE_MAX must be at least 65535.

It specifies no upper bound, and gcc’s implementation is perfectly valid.

Quoting the reference you cited (emphasis added):

Its implementation-defined value shall be equal to or greater in magnitude (absolute value) than the corresponding value given below, with the same sign.

Leave a Comment