Skip to content

Commit

Permalink
Fix C standard reroute for c2x and update changelog. (#2205)
Browse files Browse the repository at this point in the history
* Fix C standard reroute for c2x and update changelog.

* Changelog update
  • Loading branch information
andreeis authored Oct 25, 2021
1 parent c9d1168 commit 5e9a9aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Bug fixes:
- `CMake: Compile Active File` command stopped working in v1.9.0. [#2180](https://github.com/microsoft/vscode-cmake-tools/issues/2180)
- Exception after successful build when cpptools IntelliSense is disabled. [#2188](https://github.com/microsoft/vscode-cmake-tools/issues/2188)
- Fix issue with presets (v3) and "toolchainFile". [#2179](https://github.com/microsoft/vscode-cmake-tools/issues/2179)
- Don't add `-j` argument when `cmake.parallelJobs` is set to `1`. [#2187](https://github.com/microsoft/vscode-cmake-tools/issues/2187) [@mark-ulrich](https://github.com/mark-ulrich)
- Don't add `-j` argument when `cmake.parallelJobs` is set to `1`. [#1958](https://github.com/microsoft/vscode-cmake-tools/issues/1958) [@mark-ulrich](https://github.com/mark-ulrich)
- Warn the user about CMAKE_BUILD_TYPE inconsistencies. [#2096](https://github.com/microsoft/vscode-cmake-tools/issues/2096)

## 1.9.0
Improvements:
Expand All @@ -31,7 +32,7 @@ Bug fixes:
- Regression with Visual Studio generator and non-default toolset. [#2147](https://github.com/microsoft/vscode-cmake-tools/issues/2147)
- Debug shows "No compiler found in cache file." dialog. [#2121](https://github.com/microsoft/vscode-cmake-tools/issues/2121)
- Unable to work with pre-configured projects (cache is deleted). [#2140](https://github.com/microsoft/vscode-cmake-tools/issues/2140)
- Unknown C++ standard control flag: -std=gnu++2b. [#2150](https://github.com/microsoft/vscode-cmake-tools/issues/2150)
- Unknown C/C++ standard control flags: -std=gnu++2b and -std=c2x. [#2150](https://github.com/microsoft/vscode-cmake-tools/issues/2150)
- Select the most recently used build/test preset when configure preset changes. [#1927](https://github.com/microsoft/vscode-cmake-tools/issues/1927)
- Re-enable build target selection when using presets. [#1872](https://github.com/microsoft/vscode-cmake-tools/issues/1872)

Expand Down
2 changes: 1 addition & 1 deletion src/cpptools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function parseCStandard(std: string, can_use_gnu: boolean): StandardVersion {
return is_gnu ? 'gnu99' : 'c99';
} else if (/(c|gnu)(11|1x|iso9899:2011)/.test(std)) {
return is_gnu ? 'gnu11' : 'c11';
} else if (/(c|gnu)(17|18|iso9899:(2017|2018))/.test(std)) {
} else if (/(c|gnu)(17|18|2x|iso9899:(2017|2018))/.test(std)) {
if (can_use_gnu) {
// cpptools supports 'c17' in same version it supports GNU std.
return is_gnu ? 'gnu17' : 'c17';
Expand Down

0 comments on commit 5e9a9aa

Please sign in to comment.