The linter (syntax coloring) for formatted strings displays an "error" (red character) for the %b specifier in C, even though this specifier is now supported since C23
Steps to reproduce:
touch printf_linter_bug.c && code printf_linter_bug.c
- Paste:
int main(){
printf("%b \n", 0x7f);
return 0;
}
We observe that the '%' is coloured in red and the b in the string colour, whereas a correctly supported identifier (e.g. "%d") would show both in blue
This is valid C23 code, which you can check by compiling (with an up to date compiler): clang -std=c23 printf_linter_bug.c -o printf_linter_bug && ./printf_linter_bug (the command succeeds)
The linter (syntax coloring) for formatted strings displays an "error" (red character) for the %b specifier in C, even though this specifier is now supported since C23
Steps to reproduce:
touch printf_linter_bug.c && code printf_linter_bug.cWe observe that the '%' is coloured in red and the b in the string colour, whereas a correctly supported identifier (e.g. "%d") would show both in blue
This is valid C23 code, which you can check by compiling (with an up to date compiler):
clang -std=c23 printf_linter_bug.c -o printf_linter_bug && ./printf_linter_bug(the command succeeds)