Hacker News new | ask | show | jobs
by uecker 46 days ago
You should know that the type is promoted to int first, which is also what makes your example work. This is what happens when you perform the computation using an non-promoting 8 bit unsigned type: https://godbolt.org/z/fxxva4nWq
1 comments

Don't they get promoted to short?