diff --git a/compiler/src/dmd/lexer.d b/compiler/src/dmd/lexer.d index 45a7de4880..451e227e98 100644 --- a/compiler/src/dmd/lexer.d +++ b/compiler/src/dmd/lexer.d @@ -1992,8 +1992,6 @@ class Lexer break; case 'b': case 'B': - if (Ccompile) - error("binary constants not allowed"); ++p; base = 2; break; diff --git a/compiler/test/fail_compilation/numliteral.c b/compiler/test/fail_compilation/numliteral.c index c3dd4c80eb..d7ad00bfb4 100644 --- a/compiler/test/fail_compilation/numliteral.c +++ b/compiler/test/fail_compilation/numliteral.c @@ -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