  We consider the compressible isentropic Euler equations on
$\mathbb{T}^d\times [0,T]$ with a pressure law $p\in C^{1,\gamma-1}$, where
$1\le \gamma <2$. This includes all physically relevant cases, e.g.\ the
monoatomic gas. We investigate under what conditions on its regularity a weak
solution conserves the energy. Previous results have crucially assumed that
$p\in C^2$ in the range of the density, however, for realistic pressure laws
this means that we must exclude the vacuum case. Here we improve these results
by giving a number of sufficient conditions for the conservation of energy,
even for solutions that may exhibit vacuum: Firstly, by assuming the velocity
to be a divergence-measure field; secondly, imposing extra integrability on
$1/\rho$ near a vacuum; thirdly, assuming $\rho$ to be quasi-nearly subharmonic
near a vacuum; and finally, by assuming that $u$ and $\rho$ are H\"older
continuous. We then extend these results to show global energy conservation for
the domain $\Omega\times [0,T]$ where $\Omega$ is bounded with a $C^2$
boundary. We show that we can extend these results to the compressible
Navier-Stokes equations, even with degenerate viscosity.
