title: Why exactly not treat all warnings as errors when there're no warnings in third party code?
body: <p>This question is not specific to C++, just uses C++ stuff as examples.</p>
  
  <p>A widespread opinion is that "treat all warnings as errors" (like <code>/WX</code> Visual C++ option) is good because <a href="http://discuss.fogcreek.com/joelonsoftware4/default.asp?cmd=show&amp;ixPost=133392&amp;ixReplies=21" rel="nofollow"><em>a warning is a bug waiting to happen</em></a> (btw the linked thread is full of "I target for zero warnings" statements).</p>
  
  <p>The only counterargument I've seen so far is that some third-party code will not compile without warnings.</p>
  
  <p>Okay, let's for the duration of this question pretend the compiler has means of temporarily disabling warnings in some code (like this thing in Visual C++):</p>
  
  <pre><code>#pragma warning(push)
  #pragma warning(disable:X)
  #include &lt;ThirdParty.h&gt;
  #pragma warning(pop)
  </code></pre>
  
  <p>and then the third party code is not a problem anymore.</p>
  
  <p>Assuming we fully control all the code (no third party or we can disable warnings in third party code only) what are reasons for not treating warnings as errors?</p>