Why does (*p=*p) & (*q=*q); in C trigger undefined behavior if p and q are equal.
(*p=*p) & (*q=*q);
p
q
int f2(int * p, int * q) { (*p=*p) & (*q=*q); *p = 1; *q = 2; return *p + *q; }
Source (Nice article by the way): http://ift.tt/O82uIo
Aucun commentaire:
Enregistrer un commentaire