Wide-band-gap semiconductors typically can be doped either n-type or p-type, but not both. Compensation by native defects has often been invoked as the source of this difficulty. Using first-principles total-energy calculations we show that, for ZnSe and diamond, native-defect concentrations are too low to cause compensation. For nonstoichiometric ZnSe, native defects compensate both n-type and p-type material; thus deviations from stoichiometry cannot explain why ZnSe can be doped only one way. In the absence of a generic mechanism, specific dopants should be examined case by case. © 1991 The American Physical Society.