There is a simple example:
unsigned a = -5; int b = 5; if (a + b <= -1){ ... }
To which type will cast a+b? To signed or unsigned? And is it noted in C-standard or compiler will decide what to do?
a+b
Aucun commentaire:
Enregistrer un commentaire