Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

False positive on struct declaration

オープン
#14,839 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
46/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, typescript, vscode
領域
devtools, testing

調査の方向性

Start by reproducing the diagnostic in a new .c file containing the reported struct declaration, using VS Code 1.142.0 and C/C++ Extension 1.35.4 with the supplied GNU C23 configuration. The report does not identify implementation files or tests, so trace the IntelliSense handling for C struct declarations and diagnostic C/C++(3799). Done means the minimal example produces no false positive.

索引モデルが issue の本文から書いたものです。

説明

Environment
  • OS and Version: Pop!-os 26.04, kernel version : 7.2.6-76070206-generic
  • VS Code Version: 1.142.0
  • C/C++ Extension Version: 1.35.4
Bug Summary and Steps to Reproduce

Bug Summary:
When declaring a struct in C, I sometimes get the following false positive from IntelliSense:
this declaration of struct "test_s" does not declare the same type as the declaration at line 1 C/C++(3799)

Steps to reproduce:

  • Create a new .c file.

  • Paste the following code:

struct test_s {
    int x;
};
  • Observe the diagnostic on the struct declaration.

Expected behavior:
No error

Configuration and Logs
-------- Diagnostics - 20/10/2026 22:32:22
Version: 1.35.4
Current Configuration:
{
    "name": "Linux",
    "includePath": [
        "/home/fuco/Workflow/test/**"
    ],
    "defines": [],
    "compilerPath": "/usr/bin/gcc",
    "cStandard": "gnu23",
    "cppStandard": "gnu++17",
    "intelliSenseMode": "linux-gcc-x64",
    "compilerPathInCppPropertiesJson": "/usr/bin/gcc",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": false,
    "mergeConfigurations": false,
    "recursiveIncludes": {},
    "recursiveIncludesPriorityIsExplicit": false,
    "recursiveIncludesOrderIsExplicit": false,
    "compilerPathIsExplicit": false,
    "browse": {
        "limitSymbolsToIncludedHeaders": true
    }
}
Modified Settings:
{
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.function": "sameLine",
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.block": "sameLine",
    "C_Cpp.vcFormat.newLine.beforeOpenBrace.lambda": "sameLine",
    "C_Cpp.vcFormat.newLine.closeBraceSameLine.emptyType": true,
    "C_Cpp.vcFormat.space.insertAfterSemicolon": true
}
Additional Tracked Settings:
{
    "editorTabSize": 4,
    "editorInsertSpaces": true,
    "editorAutoClosingBrackets": "languageDefined",
    "filesEncoding": "utf8",
    "filesAssociations": {},
    "filesExclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/.jj": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true
    },
    "filesAutoSaveAfterDelay": true,
    "editorInlayHintsEnabled": true,
    "editorParameterHintsEnabled": true,
    "searchExclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true
    },
    "workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.35.4.0
Current database path: /home/fuco/.cache/vscode-cpptools/e1ff282c2a110311f8747a3c5f985f5e/.browse.VC.db
Translation Unit Mappings:
[ /home/fuco/Workflow/test/test.c - source TU]:
Translation Unit Configurations:
[ /home/fuco/Workflow/test/test.c ]
    Process ID: 19327
    Memory Usage: 20 MB
    Compiler Path: /usr/bin/gcc
    Language: C
    Include Paths:
        system include: /usr/lib/gcc/x86_64-linux-gnu/15/include
        system include: /usr/local/include
        system include: /usr/include/x86_64-linux-gnu
        system include: /usr/include
        include (recursive): /home/fuco/Workflow/test
    Standard Version: c23
    IntelliSense Mode: linux-gcc-x64
    Other Flags:
        --gcc
        --gnu_version=150200
Total Memory Usage: 20 MB
Other Extensions

No response

Additional context

No response

主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
1日 16時間
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-cpptools のほかの issue

microsoft/vscode-cpptools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。