Skip to content

Clang-cl should map /Wall to -Wall, not -Weverything #102982

Open
@fredemmott

Description

@fredemmott

This is not the same issue as #102583 - that issue is saying that -Wall works the same way as /-Wall, which is likely intentional

This issue is that the documented behavior of clang-cl /Wall is extremely surprising - both -Wall and /Wall should be mapped to clang's -Wall, not -Weverything

It was surprising as:

  • I had a clean build with MSVC cl.exe /Wall /WX
  • I had a clean build with clang++.exe -Wall -Werror
  • I had a failing build with clang-cl.exe /Wall /WX

The set of 'everything' is particularly problematic as even if you're passing /std:c++20, you still get -Wc++98-compat - of course my code that targets C++20 is not compatible with C++98.

While it could be argued that /W4 is closer to clang's -Wall, the above makes the current mapping basically unusable for modern code. A potential middle ground would be to map /Wall to -Wall -Wextra ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-cl`clang-cl` driver. Don't use for other compiler parts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions