mathieu: You ran,
signed char x = (signed char)-1000000;
printf ("%hhd\n", x);
printf ("%hhd\n", -1000000);
and presumably you saw, like I do,
-64
-1000000
man printf on this Debian system does not specify whether the argument is really supposed to be narrowed to char, but
the glibc manual interprets C99 to mean:
hh
Specifies that the argument is a signed char or unsigned char, as appropriate. A char argument is converted to an int or unsigned int by the default argument promotions anyway, but the h modifier says to convert it back to a char again.
...which would support your suspicion that the runtime behaviour is wrong (and the argument should be narrowed before printing).