Pseudopotential calculations within density-functional theory for a few selected solids (Si, GaAs, and Al) are used to assess the validity of two generalized-gradient approximations (GGA's), the one proposed by Becke and Perdew (BP) and the more recent one proposed by Perdew and Wang (PW) in comparison with the currently used local-density approximation (LDA). The GGA's give total energies of atoms and cohesive energies of solids that are closer to experiment than the LDA results. Lattice constants are reproduced with the same accuracy as in LDA, while bulk moduli and zone-center phonon frequencies are underestimated with respect to both the LDA and the experimental values. Comparison to all-electron results shows that in both GGA schemes the validity of the pseudopotential approach is as good as in LDA. The predictions of the two GGA's are similar, the PW functional yielding results marginally, but systematically, closer to experiment. The calculated values of the transition pressure in Si between the diamond and the beta-tin structure are 72 kbar (LDA), 164 kbar (BP), and 135 kbar (PW), to be compared with the two available experimental values of 103 and 125 kbar.