I hope this post will be helpful for someone :).
I use a lot standard c++ gcd function (__gcd(x, y)).
But today, I learnt that on some compiler __gcd(0, 0) gives exception. (Maybe because 0 is divisible by any number?! )
Note for myself and everybody: While using __gcd we must carefully handle (0, 0) case or write own gcd.
upd: AlexDmitriev noted below that we must be careful also with case __gcd(x, 0).