I've been thinking about this quite a bit lately, actually.
My last dog was a boxer/lab mix and wasn't exposed to guns and gunfire until pretty late and thus didn't really care for them at all. Generally, hearing gunfire, even if he was in the house, would make him start shaking and he'd be nervous. Other than that he was an awesome family dog and we had 14 great years. Sadly, he's passed on now, but his predecessor is doing as awesome job of filling his shoes.
The new one is a purebred yellow lab. I got her at about 13 weeks old and I think the previous owner (I got her from a local shelter) had worked with her before he had to give her up for unknown reasons. But it's funny because when we're at the cabin, any time she sees a shotgun come out, she runs to the treeline waiting for someone to drop a squirrel or bird for her. At home, any time she sees me put a pistol under my shirt and grab my keys she's ready to go for a ride, because she knows that means I'm going somewhere.
On the other hand, she totally freaked out the first time she heard me play my guitar and fiddle. She didn't know what to make of something making noise like that. Now she's learned it's nothing harmful and tolerates my practicing, but it was funny watching her trying to figure out how those instruments worked.