-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Incorrect ABI Used for Intellisense with some GCC Compilers #7794
Comments
Hi @SEL-Jeremie-Pope . Could you try changing the IntelliSenseMode to |
@Colengms, changing intellisense to the requested mode seems to fix the reported sizing issue. A tad confusing being that we aren't using a linux system, just have a similar ABI. I don't know where the previous values are being pulled from, though. Looking at all searched directories, those defines are always a product of the ABI selected, which intellisense seems to ignore. Are those values hardcoded to the particular operating systems? There will be cases where differing ABI will have to be selected for particular projects, is there any way currently that we can specify an ABI for use? I don't believe ILP64 is a model used by any configuration of the big three operating systems. |
Hi @SEL-Jeremie-Pope . Currently, the size of We currently have #4653 tracking the need for Platform/Architecture/Compiler -agnostic IntelliSense modes. We have #6931 tracking the need for a more robust solution that would allow users to provide support for non-standard and uncommon compilers. We also have #7355 which would involve using compiler defines to determine type sizes (instead of IntelliSenseMode), when available. |
Thanks for the quick reply, seems that anything that'd be added by this issue has already been replicated. I'll close this issue then as #7355 seems to already touch on anything I was investigating for diagnostics. |
Bug type: Language Service
Describe the bug
The project is aimed at a multi-core, multi-architecture embedded custom platform using the ARM GCC AArch64 ELF Bare-Metal toolchain, version 8.3 (2019-03) windows hosted compiler (i686-mingw32). Compilation, debugging, and other services outside of code navigation and intellisense are not handled by vscode, however several tools ensure that build flags, configurations, and other metadata are provided to vscode for navigation.
The repository is a large, multi-root construct which has most of the file management done outside of vscode. Conan is the primary code storage utility which delivers modifications to the workspace via an outside application through direct manipulation of the
c_cpp_properties.json
and*.code-workspace
files.c_cpp_properties.json
is then replicated from the primary root directory to any configured secondary roots for appropriate intellisense configuration.This issue appears to be separate from any complicated workspace configurations and is present both with the described workspace setup and the minimal setup shown below.
Steps to reproduce
-mabi=LP64
as a compiler option.sizeof(...)
, in aconstexpr
statement.Expected behavior
The reported sizes and values of all types should match the configured ABI, not just the default.
Code sample and logs
c_cpp_properties.json
Logs from running
C/C++: Log Diagnostics
from the VS Code command palettediagnostics.log
Logs from the language server logging
language_server.log
Screenshots
Additional context
Other errors due to size incompatibility will crop up from time to time as intellisense can't match standard functions with the malformed type sizes. Most peculiarly, when using placement new the parser will fail as the resulting types for the memory size, in this case
unsigned long long
, cannot be aliased to the library interface which expects size_t, which gets aliased tounsigned long
.Looking into the language server diagnostics, it appears that the defaults are being generated without the compiler arguments. Later the compiler query is performed again but this time with the compiler arguments. Looking at the output of that call, all sizes are appropriate. It appears that the language server is ignoring arguments when deducing the defaults for a compiler as adding the flag to the
compilerPath
rather than thecompilerArgs
produces the same results.The code compiles and otherwise behaves as expected.
The text was updated successfully, but these errors were encountered: