Issue |
117316
|
Summary |
False "GCC compatibility" warnings?
|
Labels |
new issue
|
Assignees |
|
Reporter |
cmorve-te
|
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
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs