I've run into code that simplified looks like this
__int64 fun(unsigned __int64 x, unsigned __int64 y)
{
return x - y;
}
In Visual Studio it works fine even when y>x and we have proper negative value. But is it a UB or valid situation and all other compilers will handle this also properly?
Aucun commentaire:
Enregistrer un commentaire