Hacker News new | ask | show | jobs
by klingonopera 2296 days ago
> out of range unsigned int

AFAIK, that doesn't exist? Otherwise, unsigned would also have UB?

2 comments

I think he's referring to an unsigned integer value that's out of range for the signed integer type of the same width—usually a bit pattern that would be interpreted as a negative number when cast to a signed integer type, but which negative number is not defined by the C standard because it doesn't mandate two's complement representation.
I'm reading that as, the value of the uint is out of range for the int.