Skip to content

False "GCC compatibility" warnings? #117316

@cmorve-te

Description

@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

OS << "This diagnostic flag exists for GCC compatibility, and has no "
, 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 may be there for gcc compatibility. It was there even in the clang 4.0.0 documentation.

But then you get things as -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.

-Wexport-unnamed was removed in e5c7904, 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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions