Turkey has been warned of the consequences of imposing the death penalty as punishment to those involved in the failed coup attempt.