<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 - -Wunknown-warning-option cannot be disabled via pragma"
   href="https://bugs.llvm.org/show_bug.cgi?id=50006">50006</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-Wunknown-warning-option cannot be disabled via pragma
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm@behdad.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>[Broadly speaking, this is similar to
<a class="bz_bug_link 
          bz_status_CONFIRMED "
   title="CONFIRMED - clang -Wunknown-pragmas shouldn't warn about a '#pragma GCC diagnostic' it doesn't know"
   href="show_bug.cgi?id=25436">https://bugs.llvm.org/show_bug.cgi?id=25436</a>]

In HarfBuzz we declare what warnings we want as error, as warning, and ignored,
in a C++ header file:

<a href="https://github.com/harfbuzz/harfbuzz/blob/ed2ee8a8c26dc39e39172c169d8a0d434083fefe/src/hb.hh#L37-L138">https://github.com/harfbuzz/harfbuzz/blob/ed2ee8a8c26dc39e39172c169d8a0d434083fefe/src/hb.hh#L37-L138</a>

clang (tested with Apple clang 12) warns about unknown warning options:

warning: unknown warning option '-Wunsafe-loop-optimizations'
[-Wunknown-warning-option]
warning: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'?
[-Wunknown-warning-option]

However, we have this before adding other warning options:

#pragma GCC diagnostic ignored "-Wunknown-warning-option"

But clang seems to ignore it. Making that line say "clang" instead of "GCC"
doesn't make any difference.

If I pass -Wno-unknown-warning-option on the commandline it works. As pragma
doesn't.

Am I doing this wrong? Thanks.</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>