Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c, typescript
- Domain
- developer-experience, tooling
Research direction
Reproduce with the C snippet in the report (compiles cleanly under gcc/clang with -std=c23) and confirm the three __builtin_stdc_bit_* calls get squiggled with error 70. Then find the table where the extension declares the other __builtin_* signatures and add the missing entries, matching the argument and return types in the linked gcc Bit-Operation Builtins docs. Done means the repro file shows no IntelliSense error and the calls resolve to int.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-cpptools
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
microsoft/vscode-cpptools#14872 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
microsoft/vscode-cpptools#14871 ·
Maintainers usually reply within 1 day
-
debugger
Difficulty 4/5 3-5 days Newbie friendliness 45/100
microsoft/vscode-cpptools#14869 · 1 comment ·
Maintainers usually reply within 1 day
-
Goto definition (F12) not working with (recursive) includesPossibly taken @Colengms claimed this 5 days ago. Openbug fixed Language Service
microsoft/vscode-cpptools#14868 · 2 comments · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
Support for new "!" file exclusion syntaxPossibly taken @Colengms claimed this 5 days ago. Openbug Language Service
microsoft/vscode-cpptools#14867 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in microsoft/vscode-cpptools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tintinweb/pi-subagents#459 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
danielmiessler/LifeOS#2830 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
freshframework/fresh#3920 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: client enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
opensro-dev/opensro#3681 ·
Maintainers usually reply within 1 day