[Issue 19201] New: Error: func called with argument types (ulong) matches both: __c_long and __c_ulong
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Aug 28 16:53:12 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19201
          Issue ID: 19201
           Summary: Error: func called with argument types (ulong) matches
                    both: __c_long and __c_ulong
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org
Bootstrap builds with gdc are broken in master.
Minimal version without dependencies.
---
enum __c_long : long;
enum __c_ulong : ulong;
void a(ulong r){}
void a(long r){}
void b(__c_long r){}
void b(__c_ulong r){}
void main()
{
    a(0L);
    b(0L);
}
---
Minimal version with dependencies.
---
import core.stdc.stdint;
void a(ulong r){}
void a(long r){}
void b(uint64_t r){}
void b(int64_t r){}
void main()
{
    a(0L);
    b(0L);
}
---
Places in dmd that don't compile as a result:
https://github.com/dlang/dmd/blob/05cdf2f55c9d6379e300382ab7af77837c6f4155/src/dmd/dcast.d#L377
https://github.com/dlang/dmd/blob/05cdf2f55c9d6379e300382ab7af77837c6f4155/src/dmd/dcast.d#L381
https://github.com/dlang/dmd/blob/05cdf2f55c9d6379e300382ab7af77837c6f4155/src/dmd/expressionsem.d#L9319
https://github.com/dlang/dmd/blob/05cdf2f55c9d6379e300382ab7af77837c6f4155/src/dmd/optimize.d#L938
The longdouble type has overrides for intXX_t and uintXX_t to be ABI compatible
with C++.
--
    
    
More information about the Digitalmars-d-bugs
mailing list