Bug 22924 – importC: boolean expression result should be int
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-25T11:51:32Z
Last change time
2022-03-28T09:20:11Z
Keywords
ImportC, pull
Assigned to
No Owner
Creator
duser
Comments
Comment #0 by duser — 2022-03-25T11:51:32Z
_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
Comment #1 by dlang-bot — 2022-03-27T07:39:58Z
@WalterBright created dlang/dmd pull request #13894 "fix Issue 22924 - importC: boolean expression result should be int" fixing this issue:
- fix Issue 22924 - importC: boolean expression result should be int
https://github.com/dlang/dmd/pull/13894
Comment #2 by dlang-bot — 2022-03-28T09:20:11Z
dlang/dmd pull request #13894 "fix Issue 22924 - importC: boolean expression result should be int" was merged into master:
- 5f37ddbff753ef8bd167ff3334b0cc36e999b6a2 by Walter Bright:
fix Issue 22924 - importC: boolean expression result should be int
https://github.com/dlang/dmd/pull/13894