Tosafos asks why we need a special pasuk to exempt a person who is killed by falling in a pit, it should be included in the drasha of והמת יהיה לו which means you are only chayev when the corpse can belong to the owner of the animal. Just as we exclude pesulei hamukdashin which cannot belong entirely to its owner, we should exclude adam as well since he is assur b'hana. Tosafos answers that from this pasuk alone I would have said that the ba'al habor is chayev for being mazik a goy, since he is mutar b'hanah, so we need a pasuk to exempt a ba'al habor for the death of all people.
Shulchan Aruch (Y.D. 349:1) writes that even a non-jewish corpse is assur b'hanah. The Nekudas Hakesef quotes this from a Teshuvas Harashba. But, the Nikudas Hakesef points out that both our Tosafos and the Magid Mishna hold that only a Jewish corpse is assur b'hana'ah. Gr"a proves that Tosafos is correct from David who used the orlahs to be mekadesh an isha. He also points out that the Rashba in chiddushim says like Tosafos.
However, the Pischei Teshuva reconciles Tosafos and the Rashba by saying that it is not assur d'oraysa, and that is why a special pasuk is needed to exempt when a person is killed in a bor, but is assur m'drabonon.