Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 66/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- c, typescript
研究方向
使用報告中的 C 片段重現(在 gcc/clang 下使用 -std=c23 可乾淨編譯),並確認三個 __builtin_stdc_bit_* 呼叫會以錯誤 70 顯示波浪線。接著找到擴充功能宣告其他 __builtin_* 簽章的表格,並新增缺少的項目,使其與連結的 gcc Bit-Operation Builtins 文件中的參數型別和傳回型別一致。完成意味著重現檔案不顯示 IntelliSense 錯誤,且這些呼叫解析為 int。
由索引模型根據 Issue 內容生成。
描述
Environment
OS and Version: Linux 7.2.14-arch1-1
VS Code Version: 1.145.2
C/C++ Extension Version: v1.35.6
Bug Summary and Steps to Reproduce
Bug Summary:
The signatures of the following 3 gcc builtin functions are missing:
__builtin_stdc_bit_width()__builtin_stdc_bit_floor()__builtin_stdc_bit_ceil()
And when used in code, intellisense shows an error:incomplete type "void" is not allowed (C/C++ 70)despite the code being valid.
Steps to reproduce:
Open a vscode instance, and create the following file:
#include <stdio.h>
int main(){
unsigned int x = 0x7000;
printf("%d\n", __builtin_stdc_bit_width(x));
printf("%d\n", __builtin_stdc_bit_floor(x));
printf("%d\n", __builtin_stdc_bit_ceil(x));
return 0;
}
The error squiggles appear directly, even though you can compile and run just fine: gcc -Wall -Wextra -std=c23 test.c -o test && ./test (works with clang too)
The builtin are described by the gcc documentation here
Configuration and Logs
None
Other Extensions
No response
Additional context
No response
- 主要語言
- TypeScript
- 星號
- 6.2k
- 分支
- 1.7k
- 平均合併
- 1 天 17 小時
- 30 天內合併 PR
- 12
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/vscode-cpptools 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 65/100
microsoft/vscode-cpptools#14872 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 56/100
microsoft/vscode-cpptools#14871 ·
維護者通常 1 天內回覆
-
debugger
難度 4/5 3-5 天 新手友好度 45/100
microsoft/vscode-cpptools#14869 · 1 則留言 ·
維護者通常 1 天內回覆
-
Goto definition (F12) not working with (recursive) includes可能已有人在做 @Colengms 於 5 天前認領。 未關閉bug fixed Language Service
microsoft/vscode-cpptools#14868 · 2 則留言 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Support for new "!" file exclusion syntax可能已有人在做 @Colengms 於 5 天前認領。 未關閉bug Language Service
microsoft/vscode-cpptools#14867 · 4 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 microsoft/vscode-cpptools 的全部 Issue
相似的 Issue
-
area:cli area:security bug priority:medium
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible name未關閉accessibility
難度 2/5 1-3 小時 新手友好度 72/100
numerique-gouv/lasuite-landingpage#315 ·
維護者通常 1 天內回覆
-
needs:triage
難度 1/5 1 小時以內 新手友好度 92/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 72/100
HyeokjaeChoi/vaultme#585 ·
維護者通常 1 天內回覆
-
enhancement priority/P2
難度 2/5 1-3 小時 新手友好度 72/100
beettlle/pi-smart-router#200 ·