microsoft / microsoft/vscode-cpptools

Incorrect value for `__SIZE_TYPE__` for cross compiler i686-elf-g++

Aperta
#8,875 15 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@michelleangela ci sta già lavorando.

Dal 17/2/2022.

Feature Request Feature: Configuration Feature: IntelliSense Mode Language Service Visual Studio
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Bug type: Language Service

Describe the bug

  • OS and Version: Windows10 Home 20H2 19042.1526
  • VS Code Version: 1.64.2
  • C/C++ Extension Version: 1.8.4
  • Other extensions you installed (and if the issue persists after disabling them):
  • If using SSH remote, specify OS of remote machine: WSL2 - Archlinux x64
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
    Similar to #5457 , but using a cross compiler targeting i686-elf. It's a single project.

Steps to reproduce

  1. Create hearder or source which includes stddef.h, and declare placement operator new
  2. Error message about size_t comes out.

Expected behavior

No message should be raised.

Code sample and logs

  • Code sample
#pragma once

#include <stddef.h>

inline void *operator new(size_t, void *p) noexcept {
    return p;
}

inline void *operator new[](size_t, void *p) noexcept {
    return p;
}
  • Configurations in c_cpp_properties.json
{
    "configurations": [
        {
            "name": "cross-dev",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "cStandard": "c99",
            "cppStandard": "c++11",
            "intelliSenseMode": "gcc-x86",
            "compilerPath": "/home/nekosu/osdev/inst/bin/i686-elf-g++",
            "compilerArgs": [
                "-ffreestanding",
                "-Wall",
                "-Wextra"
            ]
        }
    ],
    "version": 4
}
  • Logs from running C/C++: Log Diagnostics from the VS Code command palette
    Nothing comes out. I cannot find where it prints message (is it does). I've checked also subwindow inside output.

  • Logs from the language server logging

快速信息操作失败: FE: 'Unknown error'
loggingLevel 已更改为: Debug
cpptools/didChangeCppProperties
$/setTraceNotification
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11779)
cpptools/textEditorSelectionChange
cpptools/textEditorSelectionChange
cpptools/activeDocumentChange: /home/nekosu/nos/kernel/term.cpp
cpptools/getFoldingRanges: /home/nekosu/nos/kernel/term.cpp (id: 11780)
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11781)
cpptools/textEditorSelectionChange
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11782)
cpptools/textEditorSelectionChange
textDocument/definition: /home/nekosu/nos/kernel/term.cpp (id: 11783)
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11784)
textDocument/didClose: /home/nekosu/nos/kernel/term.cpp
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11785)
textDocument/didOpen: /home/nekosu/nos/kernel/term.cpp
正在检查语法错误: /home/nekosu/nos/kernel/term.cpp
正在为以下项的翻译单元中文件的 IntelliSense 更新进行排队: /home/nekosu/nos/kernel/term.cpp
cpptools/textEditorSelectionChange
cpptools/getDocumentSymbols: /home/nekosu/nos/kernel/term.cpp (id: 11786)
cpptools/textEditorSelectionChange
cpptools/getDocumentSymbols
cpptools/getSemanticTokens: /home/nekosu/nos/kernel/term.cpp (id: 11787)
cpptools/activeDocumentChange: /home/nekosu/nos/kernel/term.cpp
cpptools/getFoldingRanges: /home/nekosu/nos/kernel/term.cpp (id: 11788)
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11789)
cpptools/finishUpdateSquiggles
错误波形曲线计数: 0
错误波形曲线计数: 1
正在终止子进程: 19063
更新 IntelliSense 时间(秒): 0.469
cpptools/getSemanticTokens: /home/nekosu/nos/kernel/term.h (id: 11790)
cpptools/getCodeActions: /home/nekosu/nos/kernel/term.cpp (id: 11791)
cpptools/getFoldingRanges: /home/nekosu/nos/kernel/term.cpp (id: 11792)

Screenshots

image
image

Additional context

cross compiler info:

i686-elf-g++ -v
使用内建 specs。
COLLECT_GCC=i686-elf-g++
COLLECT_LTO_WRAPPER=/home/nekosu/osdev/inst/libexec/gcc/i686-elf/11.2.0/lto-wrapper
目标:i686-elf
配置为:../../gcc-11.2.0/configure --target=i686-elf --prefix=/home/nekosu/osdev/inst --enable-nls --enable-languages=c,c++ --without-headers
线程模型:single
Supported LTO compression algorithms: zlib zstd
gcc 版本 11.2.0 (GCC)

Guida per i contributori

Apri la guida per i contributori

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.