Skip to content

Commit

Permalink
Add GNU std extensions
Browse files Browse the repository at this point in the history
Closes microsoft#2782

- Add the ability for the user to pick gnu standards for the cppStandard
and cStandard options.
- While I was in there I added the c17 cStandard that was missing.
  • Loading branch information
tallen1983 committed Dec 18, 2019
1 parent 336c529 commit da31569
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Extension/c_cpp_properties.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
"c89",
"c99",
"c11",
"c17",
"gnu89",
"gnu99",
"gnu11",
"gnu17",
"${default}"
]
},
Expand All @@ -45,6 +50,12 @@
"c++14",
"c++17",
"c++20",
"gnu++98",
"gnu++03",
"gnu++11",
"gnu++14",
"gnu++17",
"gnu++20",
"${default}"
]
},
Expand Down
15 changes: 13 additions & 2 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,12 @@
"enum": [
"c89",
"c99",
"c11"
"c11",
"c17",
"gnu89",
"gnu99",
"gnu11",
"gnu17"
],
"default": null,
"description": "%c_cpp.configuration.default.cStandard.description%",
Expand All @@ -458,7 +463,13 @@
"c++11",
"c++14",
"c++17",
"c++20"
"c++20",
"gnu++98",
"gnu++03",
"gnu++11",
"gnu++14",
"gnu++17",
"gnu++20"
],
"default": null,
"description": "%c_cpp.configuration.default.cppStandard.description%",
Expand Down
11 changes: 11 additions & 0 deletions Extension/ui/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,14 @@
<div class="section-text" data-loc-id="c.standard.description">The version of the C language standard to use for IntelliSense.</div>
<div>
<select name="inputValue" id="cStandard" class="select-default">
<option value="c17">c17</option>
<option value="c11">c11</option>
<option value="c99">c99</option>
<option value="c89">c89</option>
<option value="gnu17">gnu17</option>
<option value="gnu11">gnu11</option>
<option value="gnu99">gnu99</option>
<option value="gnu89">gnu89</option>
</select>
</div>
</div>
Expand All @@ -560,6 +565,12 @@
<option value="c++11">c++11</option>
<option value="c++03">c++03</option>
<option value="c++98">c++98</option>
<option value="gnu++20">gnu++20</option>
<option value="gnu++17">gnu++17</option>
<option value="gnu++14">gnu++14</option>
<option value="gnu++11">gnu++11</option>
<option value="gnu++03">gnu++03</option>
<option value="gnu++98">gnu++98</option>
</select>
</div>
</div>
Expand Down

0 comments on commit da31569

Please sign in to comment.