<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - #pragma diagnostic push/pop docs out of date re GCC"
   href="https://bugs.llvm.org/show_bug.cgi?id=52130">52130</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>#pragma diagnostic push/pop docs out of date re GCC
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Documentation
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ojwbetts@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The clang docs at
<a href="https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas">https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas</a>
currently say:

<span class="quote">> In addition to all of the functionality provided by GCC’s pragma, Clang also allows you to push and pop the current warning state.</span >

And:

<span class="quote">> That means that it is possible to use push and pop around GCC compatible diagnostics and Clang will push and pop them appropriately, while GCC will ignore the pushes and pops as unknown pragmas.</span >

This is out-of-date as GCC has implemented `#pragma GCC diagnostic push` and
`#pragma GCC diagnostic pop` since 4.6.0 (which was released over 10 years
ago):

<a href="https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas">https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>