Thread overview
[Issue 19201] Error: func called with argument types (ulong) matches both: __c_long and __c_ulong
Aug 28, 2018
Iain Buclaw
Dec 22, 2018
Walter Bright
Dec 22, 2018
Walter Bright
Dec 29, 2018
Iain Buclaw
Dec 29, 2018
Iain Buclaw
Dec 29, 2018
Iain Buclaw
Feb 24, 2021
RazvanN
Feb 25, 2021
Iain Buclaw
August 28, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |ibuclaw@gdcproject.org
           Assignee|nobody@puremagic.com        |ibuclaw@gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
https://github.com/dlang/dmd/pull/8632

--
August 28, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

--- Comment #2 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/9772f49f99f0eaadad49f242f423c2cb1225031d fix Issue 19201 - func called with argument types (ulong) matches both: __c_long and __c_ulong

https://github.com/dlang/dmd/commit/4b2c88529b3e9773e02991ecb53c27c1990881e5 Merge pull request #8632 from ibuclaw/issue19201

fix Issue 19201 - func called with argument types (ulong) matches both:
__c_long and __c_ulong
merged-on-behalf-of: Jacob Carlborg <jacob-carlborg@users.noreply.github.com>

--
August 28, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--
December 22, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
This should be broken. long is NOT __c_long, and treating the two as an exact match does not work. (For example, template matching now fails https://issues.dlang.org/show_bug.cgi?id=19499)

The DMD code that doesn't compile should be fixed with a cast, not by breaking the type system.

--
December 22, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=19499

--
December 29, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---
           Severity|blocker                     |regression

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Reopened as a regression, as this no longer compiles on OSX, but compiles on Linux (it should be compilable by all).
---
import core.stdc.stdint;

void func(uint64_t r){}
void func(int64_t r){}

void main()
{
    func(0L);
}
---

Conversely, this no longer compiles on Linux, but compiles on OSX (it should be
rejected by all).
---
import core.stdc.stdint;

void func(uint64_t r){}
void func(int64_t r){}
void func(ulong r){}
void func(long r){}

void main()
{
    func(0L);
}
---

--
December 29, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|All                         |Mac OS X

--
December 29, 2018
https://issues.dlang.org/show_bug.cgi?id=19201

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Iain Buclaw from comment #4)
> Conversely, this no longer compiles on Linux, but compiles on OSX (it should
> be rejected by all).

Or compilable by all, either or, it is a problem that two platforms behave differently depending on what int64_t is an alias to.

--
February 24, 2021
https://issues.dlang.org/show_bug.cgi?id=19201

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #6 from RazvanN <razvan.nitu1305@gmail.com> ---
(In reply to Iain Buclaw from comment #4)
> Reopened as a regression, as this no longer compiles on OSX, but compiles on Linux (it should be compilable by all).
> ---
> import core.stdc.stdint;
> 
> void func(uint64_t r){}
> void func(int64_t r){}
> 
> void main()
> {
>     func(0L);
> }
> ---
>
This does not compile on linux either

> Conversely, this no longer compiles on Linux, but compiles on OSX (it should
> be rejected by all).
> ---
> import core.stdc.stdint;
> 
> void func(uint64_t r){}
> void func(int64_t r){}
> void func(ulong r){}
> void func(long r){}
> 
> void main()
> {
>     func(0L);
> }
> ---

This compiles on linux also.

Maybe this should be closed?

--
February 25, 2021
https://issues.dlang.org/show_bug.cgi?id=19201

--- Comment #7 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to RazvanN from comment #6)
> (In reply to Iain Buclaw from comment #4)
> > Reopened as a regression, as this no longer compiles on OSX, but compiles on Linux (it should be compilable by all).
> > ---
> > import core.stdc.stdint;
> > 
> > void func(uint64_t r){}
> > void func(int64_t r){}
> > 
> > void main()
> > {
> >     func(0L);
> > }
> > ---
> >
> This does not compile on linux either

Yes it does (v2.094.2-beta.1-559-g4522e0236)

> 
> > Conversely, this no longer compiles on Linux, but compiles on OSX (it should
> > be rejected by all).
> > ---
> > import core.stdc.stdint;
> > 
> > void func(uint64_t r){}
> > void func(int64_t r){}
> > void func(ulong r){}
> > void func(long r){}
> > 
> > void main()
> > {
> >     func(0L);
> > }
> > ---
> 
> This compiles on linux also.
> 

No it doesn't (v2.094.2-beta.1-559-g4522e0236)

--