Valid octal C23 prefixes 0o and 0O report error 19
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp, typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Start by reproducing the report in VS Code with the supplied octal.c example, then trace how the C/C++ extension diagnoses numeric literals in C23 mode. Check that 0o640 and 0O640 no longer produce error 19 while the existing 0640 case still works; the issue names no source files or tests, so locate the relevant parser or diagnostic tests first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 number octal prefixes 0o and 0O wrongly report an error in the editor, even appearing in the 'Problems' tab. Even though this is supported since C23 and it compiles fine.
The error is: extra text after expected end of number C/C++(19)
To reproduce, create an octal.c file in vscode and paste:
#include <stdio.h>
int main(){
int octal_number0 = 0640; // old school (deprecated in C2y/C29 draft) octal prefix works fine
int octal_number1 = 0o640; // error 19 reported
int octal_number2 = 0O640;
printf("%#x\n", octal_number0); // prints "0x1a0"
printf("%#x\n", octal_number1); // prints "0x1a0"
printf("%#x\n", octal_number2); // prints "0x1a0"
return 0;
}
Compiling with clang -g -Wall -Wextra -std=c23 octal.c -o octal && ./octal works without any error or warning
If you compile with -std=c2y instead, you get a deprecation warning for the 0 prefix, but the other two are still fine
Configuration and Logs
None
Other Extensions
No response
Additional context
No response
- Ngôn ngữ chính
- TypeScript
- Star
- 6.2k
- Fork
- 1.7k
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/vscode-cpptools
-
Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/vscode-cpptools#14874 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
microsoft/vscode-cpptools#14871 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
debugger
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
microsoft/vscode-cpptools#14869 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Goto definition (F12) not working with (recursive) includesCó thể đã có người làm @Colengms đã nhận 5 ngày trước. Đang mởbug fixed Language Service
microsoft/vscode-cpptools#14868 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support for new "!" file exclusion syntaxCó thể đã có người làm @Colengms đã nhận 5 ngày trước. Đang mởbug Language Service
microsoft/vscode-cpptools#14867 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/vscode-cpptools
Issue tương tự
-
area:cli area:security bug priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rtk-ai/rtk#5127 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameĐang mởaccessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
numerique-gouv/lasuite-landingpage#315 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs:triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
HyeokjaeChoi/vaultme#585 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement priority/P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
beettlle/pi-smart-router#200 ·