IntelliSense error: `First parameter of allocation function must be of type 'size_t'`
まだ誰も着手していません。
評価
調査の方向性
報告された i686-elf-g++ 構成とコンパイラ引数 -m32 を使用して、archs/i686/kernel/src/memory/vmm.cpp の診断を再現します。まず関連する issue #2460 と #4506 を読み、その後、提供された 32 ビット設定で割り当て関数の警告が解消され、新たな診断が導入されていないことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Environment
- OS and Version: Win10 22H2 19045.6466
- VS Code Version: 1.107.1
- C/C++ Extension Version: 1.29.3
- If using SSH remote, specify OS of remote machine: Kali Linux 2025.4 x86_64
Bug Summary and Steps to Reproduce
Bug Summary: Basically #2460 and #4506. It wasnt fixed. At least, not for x86 (32bit).
The workaround that was supposed to work was adding -m32 to the compiler args. Sadly, that didnt do anything.
Current code in which the intellisense errors:
void* operator new(std::size_t size) {
return Memory::VMM::g_allocator.Allocate(size);
}
void* operator new[](std::size_t size) {
return Memory::VMM::g_allocator.Allocate(size);
}
I also tried using size_t instead of std::size_t, but its the same thing; nothing changed.
Configuration and Logs
c_cpp_properties.json:
{
"configurations": [
{
"name": "OSDev",
"includePath": [
"/opt/cross/**",
"${workspaceFolder}/*",
"${workspaceFolder}/**/**",
"${workspaceFolder}/archs/**/kernel/include"
],
"defines": [
"__MULTIBOOT__",
"_DEBUG"
],
"compilerPath": "/opt/cross/bin/i686-elf-g++",
"intelliSenseMode": "linux-gcc-x86",
"compilerArgs": [
"-fno-exceptions",
"-fno-rtti",
"-std=c++2c",
"-ffreestanding",
"-nostdlib",
"-nostartfiles",
"-nodefaultlibs",
"-mno-red-zone",
"-m32"
],
"cStandard": "c23",
"cppStandard": "c++23"
}
],
"version": 4
}
C/C++ Diagnostics:
-------- Diagnostics - 12/24/2025, 4:04:03 PM
Version: 1.29.3
Current Configuration:
{
"name": "OSDev",
"includePath": [
"/opt/cross/**",
"/home/tracer/OSDev/*",
"/home/tracer/OSDev/archs/**",
"/home/tracer/OSDev/config/**",
"/home/tracer/OSDev/fonts/**",
"/home/tracer/OSDev/isodir/**",
"/home/tracer/OSDev/logs/**",
"/home/tracer/OSDev/scripts/**",
"/home/tracer/OSDev/archs/i686/**",
"/home/tracer/OSDev/config/grub/**",
"/home/tracer/OSDev/isodir/i686/**",
"/home/tracer/OSDev/archs/i686/bootloader/**",
"/home/tracer/OSDev/archs/i686/build/**",
"/home/tracer/OSDev/archs/i686/kernel/**",
"/home/tracer/OSDev/isodir/i686/boot/**",
"/home/tracer/OSDev/archs/i686/bootloader/out/**",
"/home/tracer/OSDev/archs/i686/bootloader/src/**",
"/home/tracer/OSDev/archs/i686/kernel/include/**",
"/home/tracer/OSDev/archs/i686/kernel/out/**",
"/home/tracer/OSDev/archs/i686/kernel/src/**",
"/home/tracer/OSDev/isodir/i686/boot/grub/**",
"/home/tracer/OSDev/archs/i686/kernel/out/descriptors/**",
"/home/tracer/OSDev/archs/i686/kernel/out/klibc/**",
"/home/tracer/OSDev/archs/i686/kernel/out/memory/**",
"/home/tracer/OSDev/archs/i686/kernel/include/descriptors/**",
"/home/tracer/OSDev/archs/i686/kernel/include/grub/**",
"/home/tracer/OSDev/archs/i686/kernel/include/harddisk/**",
"/home/tracer/OSDev/archs/i686/kernel/include/klibc/**",
"/home/tracer/OSDev/archs/i686/kernel/include/memory/**",
"/home/tracer/OSDev/archs/i686/kernel/include/video/**",
"/home/tracer/OSDev/archs/i686/kernel/src/descriptors/**",
"/home/tracer/OSDev/archs/i686/kernel/src/klibc/**",
"/home/tracer/OSDev/archs/i686/kernel/src/memory/**",
"/home/tracer/OSDev/archs/i686/kernel/include/harddisk/drivers/**",
"/home/tracer/OSDev/archs/i686/kernel/include"
],
"defines": [
"__MULTIBOOT__",
"_DEBUG"
],
"compilerPath": "/opt/cross/bin/i686-elf-g++",
"intelliSenseMode": "linux-gcc-x86",
"compilerArgs": [
"-fno-exceptions",
"-fno-rtti",
"-std=c++2c",
"-ffreestanding",
"-nostdlib",
"-nostartfiles",
"-nodefaultlibs",
"-mno-red-zone",
"-m32"
],
"cStandard": "c23",
"cppStandard": "c++23",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"recursiveIncludesReduceIsExplicit": false,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"compilerPathInCppPropertiesJson": "/opt/cross/bin/i686-elf-g++",
"mergeConfigurations": false,
"recursiveIncludes": {},
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Modified Settings:
{
"C_Cpp.default.intelliSenseMode": "gcc-x86",
"C_Cpp.default.compilerPath": "/opt/cross/bin/i686-elf-g++",
"C_Cpp.default.cStandard": "c23",
"C_Cpp.default.cppStandard": "c++23",
"C_Cpp.default.customConfigurationVariables": {},
"C_Cpp.loggingLevel": "Debug"
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
"*.css": "tailwindcss"
},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": false,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.29.2.0
Current database path: /home/tracer/.cache/vscode-cpptools/957e046abb2e24884e6a191f8ce7f5c7/.browse.VC.db
Translation Unit Mappings:
[ /home/tracer/OSDev/archs/i686/kernel/src/memory/vmm.cpp - source TU]:
Translation Unit Configurations:
[ /home/tracer/OSDev/archs/i686/kernel/src/memory/vmm.cpp ]
Process ID: 517
Memory Usage: 33 MB
Compiler Path: /opt/cross/bin/i686-elf-g++
Include paths:
include: /home/tracer/OSDev
include: /home/tracer/OSDev/archs/i686/kernel/include
system include: /opt/cross/i686-elf/include/c++/15.1.0
system include: /opt/cross/i686-elf/include/c++/15.1.0/i686-elf
system include: /opt/cross/i686-elf/include/c++/15.1.0/backward
system include: /opt/cross/lib/gcc/i686-elf/15.1.0/include
system include: /opt/cross/lib/gcc/i686-elf/15.1.0/include-fixed
system include: /opt/cross/i686-elf/include
Defines:
__MULTIBOOT__
_DEBUG
Standard Version: c++26
IntelliSense Mode: linux-gcc-x86
Other Flags:
--g++
--gnu_version=150100
Total Memory Usage: 33 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 1329
Number of files parsed: 110
Full C/C++ logs: https://pastebin.com/WQ93WH89
Other Extensions
No response
Additional context
Related to:
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 58
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-cpptools のほかの issue
-
bug Language Service regression
microsoft/vscode-cpptools#14795 · コメント 1 件 · 担当者 1 名 ·
-
bug Language Service parser
microsoft/vscode-cpptools#14794 · コメント 1 件 · 担当者 1 名 ·
-
more info needed
microsoft/vscode-cpptools#14793 · コメント 2 件 · 担当者 1 名 ·
-
more info needed
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/vscode-cpptools#14787 · コメント 1 件 · 担当者 1 名 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries オープンbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · コメント 1 件 · 担当者 1 名 ·
microsoft/vscode-cpptools の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
TanStack/tanstack.com#1293 ·