  Consider the space Hom(Z^n,G) of pairwise commuting n-tuples of elements in a
compact Lie group G. This forms a real algebraic variety, which is generally
singular. In this paper, we construct a desingularization of the generic
component of Hom(Z^n,G), which allows us to derive formulas for its ordinary
and equivariant cohomology in terms of the Lie algebra of a maximal torus in G
and the action of the Weyl group. This is an application of a general theorem
concerning G-spaces for which every element is fixed by a maximal torus.
