It's not a bug, it's a feature
There is a compiler option to tell it to promote for intermediate steps, which is what you are expecting. Otherwise, it saves stack space and processing power by doing the calculations as chars.
AFAIK, this behavior is in violation of the ANSI standard, but is very common for embedded processors.