To be fair Hulk with a gun while silly in the event he's part of a team or has so much as one other person assisting him like Hawkeye or Iron Man, it's not entirely senseless.
Hulk with armor is, due to the density of his skin and regeneration, or the idea it's for Banner. Which is even sillier since he turns into the Hulk to begin with, that is literally his power, but Hulk even with his enhanced speed and jump or "clapping" is still a mid to close range fighter, so if Prof Hulk or Banner needed to take out a target outside their range a gun would be a perfectly reasonable solution given their smarts, plain old Hulk though would never bother.
For that matter I don't think any of the Hulks would use a machine gun of any sort. If they wanted wanton destruction they could just chuck debris at the target. Prof Hulk and Banner would want precision and power, so some sort of sci-fi plasma weapon or rail gun would make more sense.