Skip to content

bug(query-toolchain): MSVC /W3 incorrectly enables -Weverything #687

Description

@lightovernight

With clice 0.1.0+ga4070b7 on Windows, an MSVC compile command containing /W3 unexpectedly enables -Weverything. The same compile_commands.json works as expected with clangd.

Relevant compile_commands.json entry, with paths simplified:

[
  {
    "directory": "C:/repro",
    "file": "C:/repro/W3.cpp",
    "arguments": [
      "cl.exe",
      "/nologo",
      "/TP",
      "/EHsc",
      "/std:c++17",
      "/W3",
      "-c",
      "C:/repro/W3.cpp"
    ]
  }
]

clice query --method compileCommand returns -Weverything in the resolved frontend arguments, which enables unexpected warnings such as:

variadic templates are incompatible with C++98

Replacing /W3 with /Wall produces the same -Weverything flag. Removing the warning option removes that flag.

According to [Microsoft’s documentation](https://learn.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level):

  • /W3: Reports warnings at levels 1–3.
  • /Wall: Reports all /W4 warnings, plus warnings that are normally disabled.

clice effectively applies /Wall behavior to /W3.

Here are the logs

clice-minimal-logs-only-20260917-193350.zip

Activity

  1. changed the title [-]/W3 behave as /Wall in MSVC[/-] [+]bug(query-toolchain): MSVC /W3 incorrectly enables -Weverything[/+] on Sep 19, 2026
  2. added
    kind:bugSomething doesn't work as expected
    triagedProcessed by triage — excluded from future triage runs
    on Sep 19, 2026
  3. added a commit that references this issue on Oct 3, 2026
    29c0b68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:query-toolchainToolchain detection and queryingkind:bugSomething doesn't work as expectedos:windowsHappens on Windowsstatus:needs-investigationCause unknown, needs diggingtriagedProcessed by triage — excluded from future triage runs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions