Ça, c'est un détail d'implémentation. La norme C11 dit seulement ceci:
Ce qui veut dire qu'une implémentation pourrait tout aussi bien limiter ses retours à { -42, 0, 42 } tout en restant conforme.The sign of a nonzero value returned by the comparison functions memcmp, strcmp, and strncmp is determined by the sign of the difference between the values of the first pair of characters (both interpreted as unsigned char) that differ in the objects being compared.
Partager