title: GCC, C: Finding out name of default warnings for use in #pragma ignore
body: <p>I've learned that I can put </p>
  
  <pre><code>#pragma GCC diagnostic ignored "&lt;warning&gt;"
  </code></pre>
  
  <p>to the top of a source file in order to suppress warnings related to this particular source file. However, it seems that some  names are not specific enough. For example, </p>
  
  <pre><code>#pragma GCC diagnostic ignored "-Wwrite-strings"
  </code></pre>
  
  <p>does not prevent gcc (4.7.2) from displaying warning messages whose exact names are not given, instead, these messages are followed only by [enabled by default]. I guess I need to know the correct warning names so I can use them in the <code>#pragma</code> line. I've tried </p>
  
  <pre><code>-fdiagnostics-show-option,
  </code></pre>
  
  <p>but the warnings are then still displayed as [enabled by default].</p>
  
  <p>Is there any way to identiy these warnings or to alternatively suppress warnings related to a specific source file?</p>
  
  <p>Thank you very much!</p>