Including `stdatomic.h` causes `size_t` to report the wrong type in Intellisense
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing with a minimal C file that includes stdatomic.h and declares size_t capacity = 0, then hover over size_t. The issue reports it resolving to typedef int size_t(bool) instead of unsigned long long, which the header-free case shows correctly. The configuration uses /experimental:c11atomics and /std:c17 with windowsSdkVersion 10.0.28000.0, so reproduce under those settings. Done means size_t resolves to the correct type with the header included, and the reporter's configuration is verified.
由索引模型根据 Issue 内容生成。
描述
Environment
- OS and Version: Windows 11 Pro, 26H2
- VS Code Version: 1.141.0
- C/C++ Extension Version: 1.34.4
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
Including stdatomic.h causes havoc with the size_t type, causing Intellisense failures.
Steps to reproduce:
Create a c source file that includes stdatomic.h
Make a variable of size_t (e.g size_t capacity = 0) in the code.
Hover over size_t
It will report that size_t is defined as typedef int size_t(bool)
This is incorrect.
If you remove or comment out the stdatomic.h header and hover over size_t
It will report that size_t is defined as unsigned long long size_t
This is correct.
Apparently, this is an issue in Visual Studio as well.
Configuration and Logs
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"${env:INCLUDE}"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.28000.0",
"compilerPath": "cl.exe",
"cStandard": "c11",
"cppStandard": "c++23",
"intelliSenseMode": "windows-msvc-x64",
"compilerArgs": [
"/std:c17",
"/experimental:c11atomics"
]
}
],
"version": 4
}
Other Extensions
N/A
Additional context
Intellisense is completely confused about how to parse the stdatomic.h header, or more precisely, the platform specific of the header that stdatomic.h includes.
- 主要语言
- TypeScript
- 星标
- 6.2k
- 派生
- 1.7k
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 38
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-cpptools 的其他 Issue
-
Directory iteration no longer respects files.exclude可能已有人在做 @Colengms 于 1 天前认领。 未关闭bug Language Service
microsoft/vscode-cpptools#14827 · 已指派 1 人 ·
维护者通常 1 天内回复
-
IntelliSense reports an error on a valid deduction guide (error: the return type must directly designate a specialization of the associated class template)可能已有人在做 @Colengms 于 2 天前认领。 未关闭investigate: repro Language Service
难度 4/5 3-5 天 新手友好度 52/100
microsoft/vscode-cpptools#14824 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Language Service more info needed
难度 4/5 3-5 天 新手友好度 35/100
microsoft/vscode-cpptools#14819 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 30/100
microsoft/vscode-cpptools#14817 ·
维护者通常 1 天内回复
-
Language Service more info needed
难度 4/5 3-5 天 新手友好度 15/100
microsoft/vscode-cpptools#14816 ·
维护者通常 1 天内回复
查看 microsoft/vscode-cpptools 的全部 Issue
相似的 Issue
-
chore v2
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/servers#5115 ·
维护者通常 1 天内回复
-
beginner bug good first issue
难度 1/5 1 小时以内 新手友好度 85/100
philaconvalley/website#168 ·
维护者通常 1 天内回复
-
bug frontend good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
oss-slu/lrda_mobile#294 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
hatchet-dev/hatchet#5179 ·
维护者通常 1 天内回复