We prove global existence of appropriate weak solutions for the compressible Navier–Stokes equations for a more general stress tensor than those previously covered by P.–L. Lions and E. Feireisl’s theory. More precisely we focus on more general pressure laws which are not thermodynamically stable; we are also able to handle some anisotropy in the viscous stress tensor. To give answers to these two longstanding problems, we revisit the classical compactness theory on the density by obtaining precise quantitative regularity estimates: This requires a more precise analysis of the structure of the equations combined to a novel approach to the compactness of the continuity equation. These two cases open the theory to important physical applications, for instance to describe solar events (virial pressure law), geophysical flows (eddy viscosity) or biological situations (anisotropy).