Hey guys,
I'm an electrician by day and a hobby machinist by night. Breakers are sized to protect the size of conductor they are feeding. In this case, you're welder is most likely on a 40A breaker connected to #8AWG.
The only thing that could happen if you use that circuit for your grinder...