Valid octal C23 prefixes 0o and 0O report error 19
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cpp, typescript
- Bereich
- devtools
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 1 T. 17 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-cpptools
-
Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
microsoft/vscode-cpptools#14874 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 56/100
microsoft/vscode-cpptools#14871 ·
Maintainer antworten meist innerhalb von 1 Tag
-
debugger
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
microsoft/vscode-cpptools#14869 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Goto definition (F12) not working with (recursive) includesEvtl. vergeben @Colengms hat das vor 5 Tagen übernommen. Offenbug fixed Language Service
microsoft/vscode-cpptools#14868 · 2 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Support for new "!" file exclusion syntaxEvtl. vergeben @Colengms hat das vor 5 Tagen übernommen. Offenbug Language Service
microsoft/vscode-cpptools#14867 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/vscode-cpptools
Ähnliche Issues
-
area:cli area:security bug priority:medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
rtk-ai/rtk#5127 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameOffenaccessibility
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
numerique-gouv/lasuite-landingpage#315 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs:triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
HyeokjaeChoi/vaultme#585 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement priority/P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
beettlle/pi-smart-router#200 ·