  CONTEXT: Spectroscopic analysis remains the most common method to derive
masses of massive stars, the most fundamental stellar parameter. While binary
orbits and stellar pulsations can provide much sharper constraints on the
stellar mass, these methods are only rarely applicable to massive stars.
Unfortunately, spectroscopic masses of massive stars heavily depend on the
detailed physics of model atmospheres. AIMS: We demonstrate the impact of a
consistent treatment of the radiative pressure on inferred gravities and
spectroscopic masses of massive stars. Specifically, we investigate the
contribution of line and continuum transitions to the photospheric radiative
pressure. We further explore the effect of model parameters, e.g., abundances,
on the deduced spectroscopic mass. Lastly, we compare our results with the
plane-parallel TLUSTY code, commonly used for the analysis of massive stars
with photospheric spectra. METHODS: We calculate a small set of O-star models
with the Potsdam Wolf-Rayet (PoWR) code using different approaches for the
quasi-hydrostatic part. These models allow us to quantify the effect of
accounting for the radiative pressure consistently. We further use PoWR models
to show how the Doppler widths of line profiles and abundances of elements such
as iron affect the radiative pressure, and, as a consequence, the derived
spectroscopic masses. RESULTS: Our study implies that errors on the order of a
factor of two in the inferred spectroscopic mass are to be expected when
neglecting the contribution of line and continuum transitions to the radiative
acceleration in the photosphere. Usage of implausible microturbulent
velocities, or the neglect of important opacity sources such as Fe, may result
in errors of approximately 50% in the spectroscopic mass. A comparison with
TLUSTY model atmospheres reveals a very good agreement with PoWR at the limit
of low mass-loss rates.
