Tens of thousands of people are expected to pay their respects to Benedict XVI before his funeral on Thursday.