The defending champion claimed 20 unanswered points in Wednesday???s win over Fernando Verdasco and was leading 6-1 when Gasquet???s withdrawal handed him a spot in the semi-finals.
Awaiting Federer in the last four, will be Croatian teenager Borna Coric, who earlier booked his place with an upset win over Andy Murray.
Fourth seed Tomas Berdych is also safely through after his 6-3 4-6 6-2 win over Sergiy Stakhovsky. ??
The Czech will face the winner of the remaining quarter-final between top seed Novak Djokovic and Turkish qualifier Marsel Ilhan.