I know in C
return type of sizeof
operator is size_t
being unsigned integer type defined in
. Which means
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.