microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Got error messages when using `true` and `false`

Karmylr opened this issue · comments

Environment

  • OS and Version: Windows 10
  • VS Code Version: 1.88.1
  • C/C++ Extension Version: v1.19.9
  • If using SSH remote, specify OS of remote machine: None

Bug Summary and Steps to Reproduce

Bug Summary:

Steps to reproduce:

  1. Press Ctrl+Shift+X at the same time.
  2. Right click on C/C++
  3. Click on Extension Settings
  4. Set Default: C Standard to c23
  5. Use true or false when writting C source file.
  6. Got error message.

Expected behavior:
No error messages.

Configuration and Logs

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.22000.0",
            "compilerPath": "cl.exe",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}

Hi @Karmylr,

Thank you for reporting this issue. It turns out that this is a duplicate of #11739. There is a link to a workaround in that issue that can resolve the squiggles until proper support exists in the language server.