microsoft / microsoft/vscode-cpptools
class "_PEB::<unnamed>" has no field "ImageUsedLargePages"
Open
Nobody has claimed this yet.
bug
Language Service
parser
Visual Studio
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and Version: win10
- VS Code Version: 1.90.2
- C/C++ Extension Version: 1.20.5
Bug Summary and Steps to Reproduce
Bug Summary:
#include <windows.h>
typedef struct _PEB
{
union
{
BOOLEAN SpareBool; // 3.51 to early 5.2
union // late 5.2 and higher
{
UCHAR BitField_0x03;
struct
{
// 0x01
UCHAR ImageUsedLargePages : 1; // late 5.2 and higher
UCHAR SpareBits_0x03_00 : 7;
};
};
};
} PEB, PPEB;
int main()
{
PEB peb{.ImageUsedLargePages = 1};
return 0;
}
Configuration and Logs
cl -std:c++20 test.cpp can compile
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.26100.0",
"compilerPath": "cl.exe",
"cStandard": "c23",
"cppStandard": "c++23",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}
Other Extensions
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the diagnostic with the provided Windows C++ snippet and the listed VS Code C/C++ extension configuration. Trace how IntelliSense handles the nested anonymous unions and designated initializer, then verify that the valid code no longer reports a missing ImageUsedLargePages field while preserving the existing cl.exe behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100