cat > bug.d << CODE
import core.stdc.config : cpp_ulong, cpp_ulonglong, cpp_long, cpp_longlong;
bool bug(ulong a, long b)
{
return a == b;
}
bool bug(cpp_ulong a, cpp_long b)
{
return a == b;
}
bool bug(cpp_ulonglong a, cpp_longlong b)
{
return a == b;
}
CODE
dmd -c bug.d
----
bug.d(15): Error: Comparison between different enumeration types __c_ulonglong and __c_longlong; If this behavior is intended consider using std.conv.asOriginalType
----
The exact error message depends on the platform.
The types should behave like any other signed/unsigned types w.r.t. comparison.
__c_ulonglong et.al. have been introduced as enums with magic mangling, thus comparison triggers those enum comparison errors.
Comment #1 by github-bugzilla — 2018-10-11T20:22:22Z