NOTE - To the person who edited the title. I was not asking about recoil in the sense of the gun travelling in the opposite direction to a bullet. Please read the question carefully. There is no bullet - just a fixed rod that is set in concrete. Effectively therefore the Earth is the bullet and might as well be considered to have infinite mass. As has been pointed out in the answers, the result is actually a mortar and specifically a spigot mortar. (I didn't know this before I asked).
Firing guns at friendly forces
We are besieged in the castle. Friendly forces have arrived to attack the besiegers from the rear. Unfortunately our friends are terribly short of weapons although they have plenty of ammunition but no guns. On the other hand we have plenty of guns but are rapidly running out of ammunition.
Therefore we wish to project guns over the heads of the besiegers to our friends where they can be loaded and used in battle.
The gun is loaded with a bullet-less cartridge and the gun-barrel is slid over a fixed rod that closely fits into it. The rod is angled at 45 degrees to the horizontal and set in concrete at the other end The gun is fired via a thread that pulls its hair-trigger and breaks as soon as the gun flies off towards its target.
Is shooting a gun in this way even possible or would the barrel burst? If so, how do I calculate how far the gun would travel? I am not clear how to convert the range of a bullet fired from a gun (with recoil) into the range of a gun fired from an immovable 'bullet'. Will any spin imparted to the gun owing to it not being symmetrical affect the range adversely?
All assistance gratefully received.