[Issue 23774] [REG 2.103-beta] cannot inline function `core.bitop.Split64.this`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 13 06:20:39 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23774

--- Comment #2 from Rainer Schuetze <r.sagitario at gmx.de> ---
Something changed about the `__ctfe` branch in

```
union Split64
{
    ulong u64;
    uint lo;

    pragma(inline, true)
    this(ulong u64)
    {
        if (__ctfe)
            lo = cast(uint) u64;
        else
            this.u64 = u64;
    }
}

int foo(ulong v)
{
        const sv = Split64(v);
        return (sv.lo == 0);
}
```

If you replace `__ctfe` with `false` the wwarning disappears.

--


More information about the Digitalmars-d-bugs mailing list