On 13/02/2020 02:17, Joerg Sonnenberger wrote:
I thought this fell under int promotion and thus became signed vs unsigned?
size_t is guaranteed to be at least 16bit. If INT_MAX == 32767, an
implicit cast of uint16_t would go to unsigned anyway and in all other
cases, any implicit cast must be value preserving.
My understanding was if it could be promoted to an int it would be.
So it size_t is bigger in bits than uint16_t and int is also bigger then
promotion occurs and we then have signed vs unsigned.