https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103881
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- See C99 6.3.1.1/2 and 6.3.1.8, yes, in all cases of |=, &=, |, & the uint8_t operands are promoted to int. And the reason why we don't warn for the simple binary operations is that those common cases have special cases for the warnings, while if you have more complex expressions you get warnings. This is a FE warning, value range propagation etc. doesn't happen at that point...