As for necrophilia, someone who is dead cannot give you permission to have intercourse. Even if consent was given before death there is no way to know if their mind changed at just the moment of death, or if they would have "changed their mind" after the first "experience."
For cannibalism, there are similar concerns. Also, there are probably health concerns as well seeing as you would only be able to eat people that had died (can't kill someone for food), and could have died from all sorts of diseases. Also, there is the issue of keeping track of where said meat came from that one is eating, which opens of issue of people being killed (harvested) that shouldn't be to use for such.
What about human decency on both counts.