Fix 23410 - ImportC: binary constants not allowed

This commit is contained in:
Dennis Korpel 2022-10-13 22:12:52 +02:00 committed by The Dlang Bot
parent 61d7d56a0b
commit bf72f7d109
2 changed files with 2 additions and 4 deletions

View file

@ -1992,8 +1992,6 @@ class Lexer
break;
case 'b':
case 'B':
if (Ccompile)
error("binary constants not allowed");
++p;
base = 2;
break;

View file

@ -1,13 +1,13 @@
/*
TEST_OUTPUT:
---
fail_compilation/numliteral.c(10): Error: binary constants not allowed
fail_compilation/numliteral.c(11): Error: embedded `_` not allowed
---
*/
int x = 0b00; // https://issues.dlang.org/show_bug.cgi?id=23410
// Test C-specific errors
int x = 0b00;
int y = 0_1;
// https://issues.dlang.org/show_bug.cgi?id=22549