Aren't numeric promotions only applied in mixed expressions? (However, I'm not a C language-lawyer, so I could very easily be incorrect.)
For an actual example:
uint32_t combineTwoUint16(uint16_t x, uint16_t y)
{
return x<<16 | y;
}
If int is larger than 16 bits, then this is technically undefined behavior in the case that x is greater than 2^15 as it's signed integer overflow. return (x+0U)<<16 | (y+0U);
Would it be insane to have a inline library for every arithmetic operation, that would handle such cases and offer addition optional functionality?Looks like you hit an infinite loop. Better luck next time.