title: In GCC, how can I mute the '-fpermissive' warning?
body: <p>I am including a file from a third-party library that raises an error that can be downgraded to a warning with <code>-fpermissive</code>. But because I do not want to &quot;pollute&quot; my compilation log with these warnings, I want to completely disable this messages.</p>
  <p>So far, I set the <code>-fpermissive</code> option with a <a href="http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas" rel="nofollow noreferrer">diagnostic pragma</a> when including the file; something like:</p>
  <pre><code>#pragma GCC diagnostic push
  #pragma GCC diagnostic warning &quot;-fpermissive&quot;
  
  #include &lt;third-party-file.h&gt;
  
  #pragma GCC diagnostic pop
  </code></pre>
  <p>Since GCC usually provides both a &quot;positive&quot; and &quot;negative&quot; version of the <code>-f</code> flags, I thought about ignoring the &quot;no-permissive&quot; feature:</p>
  <pre><code>#pragma GCC diagnostic ignored &quot;-fno-permissive&quot;
  #include &lt;third-party-file.h&gt;
  </code></pre>
  <p>But there does not seem to be a &quot;negative&quot; version of the <code>-fpermissive</code> flag (I am using GCC 4.6.3; but even the version 4.7.0 <a href="http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options" rel="nofollow noreferrer">does not have it</a>).</p>
  <p>Can I mimic this behavior?</p>