  Working within the theory of modified Gauss-Bonnet gravity, we show that
FLRW--like power--law solutions only exist for a very special class of
f(G)theories. Furthermore, we point out that any transition from decelerated to
accelerated expansion must pass through G=0, and no function f(G) that is
differentiable at this point can admit both a decelerating power--law solution
and any accelerating solution. This strongly constrains the cosmological
viability of f(G)-gravity, since it may not be possible to obtain an expansion
history of the universe which is compatible with observations. We explain why
the same issue does not occur in f(R)-gravity and discuss possible caveats for
the case of f(G)-gravity.

General Relativity and Quantum Cosmology