What happens if you write in the death note, gets shot to death? Do the Death Note rules permit the user to state "death by gunfire" as a cause of death?
How to use VI: Point 1


  The conditions for death will not be realized unless it is physically possible for that human or it is reasonably assumed to be carried out by that human.


If the condition can not be met because it's not possible, just as Light's Experiments found and in How to use LV: Point 2, they would just die from a heart attack

death by gunfire is quite open to interpretation, with Kiichiro Osoreda Light could have had him "die by gunfire" which could have had him killed by Raye Penber after emptying his gun or get hit by a bullet bouncing around after he shoots through Ryuk

this is about as ambiguous as "death by suicide" used by Light to kill Naomi Misora so even if the cause is ambiguous if it's achievable it'll happen, in Naomi's case we see a artistic rendition of her going to a noose however Light had wrote down that her body is never found so i very much doubt she's hanged herself so the artistic rendition is just to show she's marching off to her death

As stated in How to Use I: Point 3 and How to Use III: Point 1 if you write a person's name you have 40 seconds to either write the cause of death or the time of death after their name is write, after that as stated in Point 6 of How to Use I you then have 6 minutes and 40 seconds to details of the death however just saying death by gunfire or dies from gunfire may not be enough unless it's possible or reasonably for the target to be in a situation with a gun present, within the allotted time, in which case we can assume is within 6 minutes and 40 second, it will have a higher success rate in war zones or areas of high gun crime as "gunfire" could be from stray bullets.

in the situation where you specify the time of death first you probably have more success depending on how long the person has left to live, if you write down they die at 6:00 PM and you wrote that at 5:58 PM then wrote "death by gunfire" then in that 2 minutes the person has to be in the situation to die like that.

For the best results, As we see with Light's Execution of the FBI, the greatest rate of success would come from detailing everything before writing the person's name, this way you have all the time you need to detail how anyone could possibly be in a situation where "Death by gunfire" is the result of their death