In reality, if you do that for more than a couple of minutes, your gun explodes.
One of our experienced combat veterans, Jerry, said it's called a "runaway gun." Every time a gun -- any gun -- fires, the barrel heats up a little bit. After all, the bullet is being propelled by a tiny explosion, and it's creating metal-on-metal friction all the way down the barrel. If you pass a lot of bullets through that barrel in a row without giving it a chance to cool down, the whole gun gets literally red hot.
Hot enough, in fact, that it will eventually start spontaneously igniting (or "cooking off") the bullets without waiting for you to pull the trigger. Congratulations, you now are holding a possessed machine gun that is randomly spraying bullets on its own, which is enough to make even the most grizzled member of the Expendables cast shit his pants:
Now imagine the above happening when you're, say, running, or have just climbed into a vehicle, or any other situation where you totally don't want to be shooting a gun at that particular moment (life is actually full of such situations, if you think about it). And that's the best-case scenario -- when ammunition cooks off, things can get uncomfortably explodey for the man behind the gun: