Wolftooth will let you clear the 40, but unless you go super compact up front, the overall capacity of the derailleur will be exceeded. In my recent experience (Tiagra 4700 and 105 5700) a GS derailleur will do 11-34 with a standard compact. I have needed in both cases (~30mm between dropout / derailleur bolt centres) I have needed the wolftooth roadlink to clear the 34T, although a long b-screw may just do the trick.
Wolftooth will let you clear the 40, but unless you go super compact up front, the overall capacity of the derailleur will be exceeded. In my recent experience (Tiagra 4700 and 105 5700) a GS derailleur will do 11-34 with a standard compact. I have needed in both cases (~30mm between dropout / derailleur bolt centres) I have needed the wolftooth roadlink to clear the 34T, although a long b-screw may just do the trick.