May 28, 2022

On Saturday, 28 May 2022 at 15:10:25 UTC, Steven Schveighoffer wrote:
[...]

>

Is this specific to gdc, or does it happen for other compilers as well?

The former.

May 30, 2022

On Saturday, 28 May 2022 at 22:23:34 UTC, kdevel wrote:

>

On Saturday, 28 May 2022 at 15:10:25 UTC, Steven Schveighoffer wrote:
[...]

>

Is this specific to gdc, or does it happen for other compilers as well?

The former.

Please check the dlang versions of all compilers. The template emission scheme is changing quite often between versions, indeed leading to linking problems with separate compilation and complex template instantiation trees (one of the main compiler upgrade issues at Weka, with LDC).

-Johan

July 06, 2023
On Saturday, 28 May 2022 at 14:44:56 UTC, Adam D Ruppe wrote:
> On Saturday, 28 May 2022 at 14:16:51 UTC, kdevel wrote:
>> $ gdc -o ppinsta ppinsta.d parser.d
>
> Compiling together is faster anyway this is prolly what you want most the time.
>
> But I know what's going on now, it is the template emission thing, the compiler thinks, since it is from std, it was already compiled somewhere else and skips it but it isn't actually there so the linker errors.
>
> Using
>
> gdc -fall-instantiations -c parser.d
>
> Might generate it in that parser.o getting it to link. Might need to be used in all builds but I *think* just here, hard to say without a test.

I just encountered this problem in recently released debian bookworm (gdc 12.2.0), I was able to fix these undefined lambdas inside std library with -fall-instantiations, and a bunch of other undefined lambdas in my own code by changing template arguments of the form
alias e = (a => a)
to a separate definition
auto (T)default_e(T a)
{
   return a;
}
and
alias e = default_e
July 06, 2023
On Thursday, 6 July 2023 at 22:44:27 UTC, Alexibu wrote:

>
> I just encountered this problem in recently released debian bookworm (gdc 12.2.0), I was able to fix these undefined lambdas inside std library with -fall-instantiations, and a bunch of other undefined lambdas in my own code by changing template arguments of the form
> alias e = (a => a)
> to a separate definition
> auto (T)default_e(T a)
> {
>    return a;
> }
> and
> alias e = default_e


Using GDC may require rewrite?

I have thought GDC use the same front-end as DMD & LDC?

1 2
Next ›   Last »