It is shown that using a generalized gradient approximation (GGA) functiona
l describing exchange and correlation (xc) effects in electronic structure
calculations implies additional re terms in the virial theorem and the pres
sure tensor. These new expressions generalize the forms well known in the l
ocal density approximation and are useful for checking the numerical precis
ion of self-consistent field calculations for atoms and solids, and for acc
urate pressure computations in heavy elements. Numerical examples are given
.