Depends on the situation. If a Navy sailor said to an Army Sgt "Hand me that f----g stapler", it would be appropriate to tell the Navy guy to watch his mouth.
If a Navy sailor said to an Army Sgt "Get your guys and grab your f----g guns, we got pirates coming over the railing!" and the Army Sgt did ANYTHING BUT quickly comply, I would have the Sgt court-martialed, if not thrown overboard.
In an emergency situation where lives are potentially at stake, EVERYTHING takes a back seat to dealing with the emergency, including being bothered by bad language.