1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| void TestSize2(void) /*ligne 27*/
{
{
unsigned short myu16 = 1;
signed long mys32 = -myu16;
signed long oths32 = 0;
oths32 -= myu16;
printf("Valeurs 32 bits apres soustraction d'un nombre 16 bits sans signe: %ld, %ld.\n", mys32, oths32);
}
{
unsigned long myu32 = 1;
signed long mys32 = -myu32; /* ligne 39 ici */
signed long oths32 = 0;
oths32 -= myu32;
printf("Valeurs 32 bits apres soustraction d'un nombre 32 bits sans signe: %ld, %ld.\n", mys32, oths32);
}
{
unsigned long myu32 = 1;
signed long long mys64 = -myu32; /* ligne 47 ici */
signed long long oths64 = 0;
oths64 -= myu32;
printf("Valeurs 64 bits apres soustraction d'un nombre 32 bits sans signe: %lld, %lld.\n", mys64, oths64);
}
{
signed long mys32 = -sizeof(int); /* ligne 54 ici */
signed long oths32 = 0;
signed long long mys64 = -sizeof(int); /* ligne 56 ici */
signed long long oths64 = 0;
oths32 -= sizeof(int);
oths64 -= sizeof(int);
printf("Valeurs 32 bits apres soustraction d'un sizeof: %ld, %ld.\n", mys32, oths32);
printf("Valeurs 64 bits apres soustraction d'un sizeof: %lld, %lld.\n", mys64, oths64);
}
} |
Partager