Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#14,825 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
1g 18h
PR unite (30g)
38

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/vscode-cpptools

Tutte le issue di microsoft/vscode-cpptools

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.