-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Can we support GCC C extensions? #2172
Comments
Our parser supports some of the extensions, although we may need to do additional work to get the features turned on, but some of the extensions our parser doesn't support. |
Yes. Some extensions are rarely used but some occurs everywhere in the linux kernel but still not supported. e.g.
Getting errors like "expected an expression" or "expected a ';' " really destroys the experience. |
Your first line, the declaration, is missing a ";", so the "expected a ;" appears correct. After correcting that, the code you use should work without any errors. If there are errors, you may need to set your compilerPath correctly or provide more repro details. I'm pretty sure there are some GNU extensions we don't support though (from previous users reporting problems with them). |
I'm having a problem where one specific macro defined in the linux kernel code is triggering an intellisense error:
The macro is
I'm using the setup from https://github.com/amezin/vscode-linux-kernel to browse the kernel tree with VS Code. @sean-mcmanus, is this also a matter of C standard? The top-level Just making sure I'm having a similar enough problem to OP so as to not open a new issue. |
Can we support "Statement Exprs"? @sean-mcmanus
I have already set "compilerPath" and "cStandard", but the error still exists. It seems same as earlier posts. I wonder if we can support this feature? https://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Statement-Exprs.html#Statement-Exprs |
@RaspStudio I don't repro the issue -- can you run the C/C++: Log Diagnostics command and either provide the output or specifically what IntelliSense mode is being used. I don't repro the bug with a gcc IntelliSense mode (only msvc). A complete/compiling code example may also help (I had to add code, which might be different from the code you have). |
It seems that I've solved this, and I can't repro this either. Current Configration.
I'm so confused but it seems everything is right now. But anyway thank you! @sean-mcmanus |
For example, typeof keyword, variable length and zero length arrays. Currently many of them are treated as unknown identifiers and the IntelliSense raises many errors.
http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/C-Extensions.html
The text was updated successfully, but these errors were encountered: