title: Which integral promotions do take place when printing a char?
body: <p>I recently read that</p>
  
  <pre><code>unsigned char x=1;
  printf("%u",x);
  </code></pre>
  
  <p>invokes undefined behaviour since due to the format specifier %u, printf expects an unsigned int. But still I would like to understand what is going on in this example.</p>
  
  <p>I think that the integral promotion rules apply with the expression <code>printf("%u",x)</code> 
  and the value represented by <code>x</code>.</p>
  
  <blockquote>
    <p>A.6.1 Integral Promotion</p>
    
    <p>A character, a short integer, or an integer bit-field, all either signed or not, or an
    object of enumeration type, may be used in an expression wherever an integer may be used.
    If an int can represent all the values of the original type, then the value is converted
    to int; otherwise the value is converted to unsigned int. This process is called integral
    promotion.</p>
  </blockquote>
  
  <p>What does "may be used" mean here? Does it mean 'is syntactically correct' or 'is defined behaviour'? </p>
  
  <p>And how is x promoted in this example? I have read that it is promoted to an int, but if <code>printf("%u", (int x))</code> is still undefined behaviour then I don't really understand why...</p>