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
C23 features aren't supported #10696
Comments
The EDG parser used for IntelliSense hasn't implemented the feature yet -- you can check the feature set implemented at https://en.cppreference.com/w/c/23 to track the progress, although it may take some delay before we can ship an update. |
EDG C23 feature status here: https://docs.google.com/spreadsheets/d/1XGTWYSks6L_20aAi4XiS-3pyi2cS_z_k-NKAroelGX8/edit#gid=0 The chart here, https://en.cppreference.com/w/c/23, is out of date according to that spreadsheet. For example, the spreadsheet shows support for constexpr object defs and I am not seeing that in VSCode. |
@JPHutchins that google docs link has write permissions. |
Related on Stack Overflow: VS Code's C/C++ extension says the C23 true and false keywords are unidentified |
Is there a update to this? It appears that per the Google Doc linked above, the C2X / EDG parser supports a few things that currently incorrectly throw errors in VSCode - most notably binary literals. |
@markgoetz, which version of the extension are you using? I forget when we merged EDG 6.5 into our extension, but it's in 1.19.3 as far as I can tell. EDG 6.6 should be in 1.20.0 and above. I'm not sure how valuable keeping this bug open is for us though since we're not driving the implementation of individual C23 features, however, it looks like we do need to update our support to pass ms_c23 to EDG, as support for that switch was recently added and we're still clamped to ms_c17. @browntarik would you be able to prep a PR for that? |
I am on 1.19.4 and still seeing the error. |
@markgoetz can you share some code/screenshots and the output of running the |
I noticed "Standard version: c17" for the file I have open. Maybe I have something misconfigured? |
Yes, something seems wrong here. I can confirm on macOS that c17 mode produces the error in your screenshot, and c23 mode does not, so getting the extension to use c23 for your source file seems to be what's blocking you from getting correct IntelliSense here. The extension will not know how to get information from your |
I changed the compilerPath and it seems to work! Thanks for the assistance! |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
There was an issue (#10615) that allows you to select c23/gnu23 as your compiler version, but the actual new language features are not implemented yet. Obviously this stuff is bleeding edge, but I struggled trying to get it to work and I wanted to submit an issue.
I would be happy to work on adding these features to the C/C++ language server, but I would need to be pointed in the right direction.
Steps to reproduce:
Verify that these all generate "Problems"
Compile with
-std=gnu2x
or equivalent, on a very new compiler (I used clang 17) and verify that there are no errorsExpected behavior:
Generate the same errors that clang 17 would, or equivalent
Configuration and Logs
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: