Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cpptools] Unknown C++ standard control flag: -std=gnu++2b #2150

Closed
Wongboo opened this issue Oct 3, 2021 · 9 comments
Closed

[cpptools] Unknown C++ standard control flag: -std=gnu++2b #2150

Wongboo opened this issue Oct 3, 2021 · 9 comments

Comments

@Wongboo
Copy link

Wongboo commented Oct 3, 2021

Brief Issue Summary

I think it's bug about C/C++ extension doesn't support control flag: -std=gnu++2b, anyway it eventually pops up in CMake/Build

CMake Tools Diagnostics

I cannot run CMake: Log Diagnostics, insteead run C/C++: Log Diagnostics

Version: 1.6.0
Current Configuration:
{
    "name": "Win32",
    "includePath": [
        "${workspaceFolder}/**",
        "${vcpkgRoot}/x64-windows/include"
    ],
    "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
    ],
    "windowsSdkVersion": "10.0.19041.0",
    "compilerPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\cl.exe",
    "cStandard": "c17",
    "intelliSenseMode": "windows-msvc-x64",
    "compilerArgs": [],
    "cppStandard": "c++20",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": true,
    "compilerPathIsExplicit": false,
    "browse": {
        "path": [
            "${workspaceFolder}/**",
            "${vcpkgRoot}/x64-windows/include"
        ],
        "limitSymbolsToIncludedHeaders": true
    }
}

Debug Log

[cpptools] Unknown C++ standard control flag: -std=gnu++2b
[cpptools] Unknown standard control flag: -std=gnu++2b
[cpptools] Unknown C++ standard control flag: -std=gnu++2b
[cpptools] Unknown standard control flag: -std=gnu++2b
[cpptools] Unknown C++ standard control flag: -std=gnu++2b
[cpptools] Unknown standard control flag: -std=gnu++2b
[cpptools] Unknown C++ standard control flag: -std=gnu++2b
[cpptools] Unknown standard control flag: -std=gnu++2b
[cpptools] Unknown C++ standard control flag: -std=gnu++2b
[cpptools] Unknown standard control flag: -std=gnu++2b
@linquize
Copy link

linquize commented Oct 3, 2021

It seems you are using MSVC.
gnu++2b is for GCC.

@linquize
Copy link

linquize commented Oct 3, 2021

Where do you put gnu++2b flag?

@Wongboo
Copy link
Author

Wongboo commented Oct 3, 2021

I'm using Clang 12.0.0 (GNU CLI) for MSVC 16.11.31702.278 (Visual Studio Community 2019 Release - amd64), so I can put gnu++2b while seems to be using MSVC, and that's just intellisence mode which shouldn't bother, once I set CMAKE_CXX_STANDARD to 20, it disappears, so it must be plugin's problem

@linquize
Copy link

linquize commented Oct 3, 2021

gnu++2b is C++23, not C++20

@Wongboo
Copy link
Author

Wongboo commented Oct 3, 2021

@linquize , clearly you misundertand me for multiple times, when I set CMAKE_CXX_STANDARD to 23, the bug appears, to 20, it disappears, am I clear?

@andreeis andreeis added this to the 1.9.0 milestone Oct 4, 2021
@andreeis
Copy link
Contributor

andreeis commented Oct 4, 2021

@Wongboo, thank you for opening this report. We will fix this.

@andreeis
Copy link
Contributor

This fix is included in the 1.9.0 CMake Tools release. Please upgrade your extension in VSCode and let us know if you encounter any other issues.

@Wongboo
Copy link
Author

Wongboo commented Oct 21, 2021

I think the same issue appears for -std=c2x, for CMAKE_C_STANDARD

@andreeis
Copy link
Contributor

@Wongboo, thank you for pointing that out. We fixed the remaining C standard bug in CMake Tools 1.9.1 which was just released. Please try it and let us know if you encounter any other issues.

@andreeis andreeis modified the milestones: 1.9.0, 1.9.1 Oct 25, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants