Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Including `stdatomic.h` causes `size_t` to report the wrong type in Intellisense

未關閉
#14,825 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@Colengms 已經在處理了。

開始於 2026年10月13日。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
c
領域
devtools

研究方向

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 內容生成。

描述

bug fixed Language Service
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 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

microsoft/vscode-cpptools 的其他 Issue

查看 microsoft/vscode-cpptools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。