Accoring to the article “Wade not in unknown waters. Part three” we may not perform a bit shift of negative integers. Still, we need to do it when converting from negative SmallInt value to it's pointer representation.
We need to provide a workaround that will eliminate possible UB and not corrupt the value's sign.
Accoring to the article “Wade not in unknown waters. Part three” we may not perform a bit shift of negative integers. Still, we need to do it when converting from negative SmallInt value to it's pointer representation.
We need to provide a workaround that will eliminate possible UB and not corrupt the value's sign.