C has implicit conversions between types and will automatically convert from
int32_t
to
int
as needed. The problem is that an
int
is not guaranteed to be big enough to hold all possible values that
int32_t
can hold.
int32_t
is guaranteed to be 32-bits two's complement. But a plain
int
can be as small as 16-bits, and can be two's complement, one's complement, or sign magnitude. So in general, code that's converting between fixed-sized types and plain
int
needs to be code reviewed to see why that's necessary. —
user3386109 49 secs ago