Including `stdatomic.h` causes `size_t` to report the wrong type in Intellisense
維護者通常 1 天內回覆
@Colengms 已經在處理了。
開始於 2026年10月13日。
評估
研究方向
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 天 16 小時
- 30 天內合併 PR
- 20
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-cpptools 的其他 Issue
-
Allow case-insensitive suppression of parameter inlay hints可能已有人在做 @Colengms 於 8 天前認領。 未關閉bug Feature: Inlay Hint fixed Language Service
難度 2/5 1-3 小時 新手友好度 68/100
microsoft/vscode-cpptools#14829 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
code runner未關閉Language Service more info needed
難度 5/5 一週以上 新手友好度 15/100
microsoft/vscode-cpptools#14840 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 1-2 天 新手友好度 46/100
microsoft/vscode-cpptools#14839 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 30/100
microsoft/vscode-cpptools#14838 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 38/100
microsoft/vscode-cpptools#14834 ·
維護者通常 1 天內回覆
查看 microsoft/vscode-cpptools 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
phivk/rubiks-lab#33 ·
維護者通常 1 天內回覆
-
BUG:Edit Album strips spaces from the password so albums with a leading/trailing space in the password can't be edited可能已有人在做 @ManyaJain111 今天認領。 未關閉bug enhancement possible-duplicate
難度 2/5 1-3 小時 新手友好度 77/100
AOSSIE-Org/PictoPy#1637 · 4 則留言 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
chaitin/MonkeyCode#1437 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
area:cards enhancement migration ready-for-agent
難度 2/5 1-3 小時 新手友好度 70/100
fil-donadoni/tolaria#6309 ·
維護者通常 1 天內回覆