Целочисленная раскрутка с оператором <<

Похоже на вопросBitshift и целочисленное продвижение?У меня есть вопрос о целочисленном продвижении при использовании битовых сдвигов влево.

unsigned int test(void)
{
  unsigned char value8;
  unsigned int result;

  value8 = 0x12;
  result = value8 << 8;
  return result;
}

In this case, will be the value8 first promote to unsiged int or is it implementation specific?

6.5.7 Bitwise shift operators ... 3 Sematics ...
The integer promotions are performed on each of the operands. The type of the result is that of the promoted left operand. If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined.

Это говорит о том, что"The integer promotions are performed on each of the operands."Но что здесь за правило продвижения?

Я предполагаю, что это должно бытьconvert to int if lesser rank than int, но я не могу его найти.

Я спрашиваю об этом, так как один компилятор (Renesas nc30wa) не продвигает к int, поэтому результат всегда равен 0 для моего образца.

На этой платформе символ имеет ширину 8 бит и 16 бит.

Ответы на вопрос(2)

Ваш ответ на вопрос