[Issue 22924] New: importC: boolean expression result should be int

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 25 11:51:32 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=22924

          Issue ID: 22924
           Summary: importC: boolean expression result should be int
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: ImportC
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: duser at neet.fi
                CC: duser at neet.fi

_Static_assert(sizeof(!0) == 4, ""); // fails, dmd gives 1 as the size

printing the type with a D function like "void pty(T)(T
t){writeln(T.stringof);}" gives "bool"

all the operators that return a boolean in C use int as the type

--


More information about the Digitalmars-d-bugs mailing list