fjpanag commented on issue #7274:
URL:
https://github.com/apache/incubator-nuttx/issues/7274#issuecomment-1273644051
> So the following is UB?
Answering my own question, I think it is indeed UB, because `ulong_val` is
cast to a signed type.
Changing it to the following seems to resolve the issue, but I would
appreciate any input from @no1wudi .
```c
return (int64_t)(ulong_val << extra_bits >> extra_bits);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]