The research into this is usually called &quot;effect systems&quot;, I think. You can use it to prove that ugly old APIs like OpenGL are being used properly in your code.<p>As far as the real world goes, all you get is -Wunused.