If you need a particular lens, you should already know it.
Do you have the 17-55mm IS? Its the first lens a crop camera owner should buy if you use normal focal lengths.
The 35mm l is not a beginner lens, at f/1.4 it frequently needs microfocus adjuse, which is not available on your 40D. I'd go for the 35mm f/2. you would probably be happier.
The 70-200mm f/4L IS will work well and be very sharp on both cameras, do you use that focal length range?
Getting a lens and then looking for something to use it on is not a good plan, even a poorer plan if its a expensive lens.