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.
Comment #4 by ibuclaw — 2018-12-29T14:11:01Z
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);
}
---
Comment #5 by ibuclaw — 2018-12-29T14:14:07Z
(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.
Comment #6 by razvan.nitu1305 — 2021-02-24T14:44:25Z
(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?
Comment #7 by ibuclaw — 2021-02-25T09:08:14Z
(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)
Comment #8 by robert.schadek — 2024-12-13T19:00:25Z