<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/117316>117316</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            False "GCC compatibility" warnings?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          cmorve-te
      </td>
    </tr>
</table>

<pre>
    Not sure if there is a problem here. But I don't have time to look further, and probably better to get somebody to double check.

In https://github.com/llvm/llvm-project/blob/063a6f70a6e86deb81fe6b1f24fecb7774d8cb44/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp#L1972, it seems to default to use "This diagnostic flag exists for GCC compatibility, and has no effect in Clang." in some situations. I don't fully understand the details, but I have observed a few warnings with this message in the documentation that I don't think gcc ever had.

So sure, [-Wabi](https://clang.llvm.org/docs/DiagnosticsReference.html#wabi) may be there for [gcc compatibility](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wabi). It was there even in the [clang 4.0.0 documentation](https://releases.llvm.org/4.0.0/tools/clang/docs/DiagnosticsReference.html#wabi).

But then you get things as [-Wexport-unnamed](http://clang.llvm.org/docs/DiagnosticsReference.html#wexport-unnamed). Which,
- I can't find in any version of the gcc documentation.
- Was documented as a normal, valid, warning in the clang [16.0.0 documentation](https://releases.llvm.org/16.0.0/tools/clang/docs/DiagnosticsReference.html#wexport-unnamed).

-Wexport-unnamed was removed in https://github.com/llvm/llvm-project/commit/e5c7904fa0bfa5a24f192cfa7b9116560e1f5d43, which just says "This patch removes these diagnostics". It doesn't say anything about being kept as a flag for GCC compatibility.

Is it possible some warnings have not been properly removed, and ended up marked as "for GCC compatibility" incorrectly?
If so, I can list the following suspects (there may be more, specially if removed recently):
- https://clang.llvm.org/docs/DiagnosticsReference.html#wauto-import was https://releases.llvm.org/14.0.0/tools/clang/docs/DiagnosticsReference.html#wauto-import
- http://clang.llvm.org/docs/DiagnosticsReference.html#wexport-unnamed was https://releases.llvm.org/16.0.0/tools/clang/docs/DiagnosticsReference.html#wexport-unnamed
- https://clang.llvm.org/docs/DiagnosticsReference.html#wgnu-empty-initializer was https://releases.llvm.org/16.0.0/tools/clang/docs/DiagnosticsReference.html#wgnu-empty-initializer
- https://clang.llvm.org/docs/DiagnosticsReference.html#wignored-pragma-optimize was https://releases.llvm.org/14.0.0/tools/clang/docs/DiagnosticsReference.html#wignored-pragma-optimize
- https://clang.llvm.org/docs/DiagnosticsReference.html#wreturn-std-move was https://releases.llvm.org/12.0.0/tools/clang/docs/DiagnosticsReference.html#wreturn-std-move
- https://clang.llvm.org/docs/DiagnosticsReference.html#wgnu-binary-literal was https://releases.llvm.org/18.1.0/tools/clang/docs/DiagnosticsReference.html#wgnu-binary-literal
- https://clang.llvm.org/docs/DiagnosticsReference.html#wgnu-offsetof-extensions was https://releases.llvm.org/18.1.0/tools/clang/docs/DiagnosticsReference.html#wgnu-offsetof-extensions

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8V11v4ygX_jXk5shWTOy4vsjFtH09qvRqV9odqdcYDjZTDBbgtJlfvwInnWS2I3Wn0dy0uBTOeT54sJn3qjeIO1Ldkup-xeYwWLfjo3V7zAKuOisOuz9sAD87BCUhDBgHHhhMznYaR4h_yeF2DvAAwhpC6wAD2yMENSIEC9raJ5Czi2sJvQNmRFrMOn2ADkNAF_-txwDejhhrxmdh504j8AH5U07W92T9afn5YGAIYfJk84nQltC2V2GYu5zbkdBW6_3pVzY5-xV5ILTttO0IbdfbDdvKes22eLMV2N0UErddIWkpkXd1XZfihndlSWjLNTM9oe0clPaEtl9Yp_EzGkLbuzh1r1hvrA-K-_-NKoLI-TQRuvl_0dQ04lQBPOLoExiUbNYhDmePQCj9MigP4nUTkJr1gC_KBw_SOvh8dwfcjhMLqlNahcOJuoF5MBZQSuQBlIHUTk4ojQ-RQfAqzCwoa3x-JoqctT7AbAQ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