www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23410] New: ImportC: binary constants not allowed


          Issue ID: 23410
           Summary: ImportC: binary constants not allowed
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dave287091 gmail.com

Binary literals like “0b101” in C files fail with the error "Error: binary
constants not allowed”. These should be allowed in C files as it was
standardized for C23, and is supported as an extension already by clang, gcc,
tcc and probably others.

Working draft for C23 can be seen here:

Oct 13 2022