Including `stdatomic.h` causes `size_t` to report the wrong type in Intellisense
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 6.2k
- Fork
- 1.7k
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 35
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-cpptools
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/vscode-cpptools#14829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Directory iteration no longer respects files.excludeCó thể đã có người làm @Colengms đã nhận 2 ngày trước. Đang mởbug Language Service
microsoft/vscode-cpptools#14827 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
IntelliSense reports an error on a valid deduction guide (error: the return type must directly designate a specialization of the associated class template)Có thể đã có người làm @Colengms đã nhận 3 ngày trước. Đang mởinvestigate: repro Language Service
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
microsoft/vscode-cpptools#14824 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Language Service more info needed
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
microsoft/vscode-cpptools#14819 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
microsoft/vscode-cpptools#14817 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/vscode-cpptools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(icons): add [solidping]Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
homarr-labs/dashboard-icons#2939 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Agent/category reasoning variants are still checked against the stale model cache in chat.paramsĐang mởopencode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
code-yeongyu/oh-my-openagent#10003 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Actions on ToastsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
Maintainer thường phản hồi trong vòng 1 ngày