Thread overview
Template depth switch?
Jan 16, 2014
bearophile
Jan 16, 2014
Kai Nacke
Jan 16, 2014
bearophile
Jan 20, 2014
Kai Nacke
Jul 01, 2014
Kai Nacke
Jul 01, 2014
Kai Nacke
January 16, 2014
I am seeing an "recursive expansion" error generated by ldc2 on some D code. Do you know how to extend the max number of recursive calls, as with the -ftemplate-depth= switch of GCC?

Bye and thank you,
bearophile
January 16, 2014
Hi bearophile!

On Thursday, 16 January 2014 at 12:47:58 UTC, bearophile wrote:
> I am seeing an "recursive expansion" error generated by ldc2 on some D code. Do you know how to extend the max number of recursive calls, as with the -ftemplate-depth= switch of GCC?
>
> Bye and thank you,
> bearophile

There is no switch - the limit is hardcoded in the frontend source.
Does the source compile with dmd?

Regards,
Kai
January 16, 2014
Kai Nacke:

> There is no switch - the limit is hardcoded in the frontend source.
> Does the source compile with dmd?

The program gives the same error message with dmd. Can't you replace this front-end hard-coded value with a value that optionally can be specified with a compiler switch (despite the risk of compiler crash)?

Bye,
bearophile
January 20, 2014
On Thursday, 16 January 2014 at 15:42:50 UTC, bearophile wrote:
> Kai Nacke:
>
>> There is no switch - the limit is hardcoded in the frontend source.
>> Does the source compile with dmd?
>
> The program gives the same error message with dmd. Can't you replace this front-end hard-coded value with a value that optionally can be specified with a compiler switch (despite the risk of compiler crash)?
>
> Bye,
> bearophile

Yes, I can do this. I try to create a DMD pull request for it.

Regards,
Kai
July 01, 2014
On Monday, 20 January 2014 at 06:57:40 UTC, Kai Nacke wrote:
> On Thursday, 16 January 2014 at 15:42:50 UTC, bearophile wrote:
>> Kai Nacke:
>>
>>> There is no switch - the limit is hardcoded in the frontend source.
>>> Does the source compile with dmd?
>>
>> The program gives the same error message with dmd. Can't you replace this front-end hard-coded value with a value that optionally can be specified with a compiler switch (despite the risk of compiler crash)?
>>
>> Bye,
>> bearophile
>
> Yes, I can do this. I try to create a DMD pull request for it.
>
> Regards,
> Kai

https://github.com/D-Programming-Language/dmd/pull/3708
July 01, 2014
On Tuesday, 1 July 2014 at 18:23:10 UTC, Kai Nacke wrote:
> On Monday, 20 January 2014 at 06:57:40 UTC, Kai Nacke wrote:
>> On Thursday, 16 January 2014 at 15:42:50 UTC, bearophile wrote:
>>> Kai Nacke:
>>>
>>>> There is no switch - the limit is hardcoded in the frontend source.
>>>> Does the source compile with dmd?
>>>
>>> The program gives the same error message with dmd. Can't you replace this front-end hard-coded value with a value that optionally can be specified with a compiler switch (despite the risk of compiler crash)?
>>>
>>> Bye,
>>> bearophile
>>
>> Yes, I can do this. I try to create a DMD pull request for it.
>>
>> Regards,
>> Kai
>
> https://github.com/D-Programming-Language/dmd/pull/3708

And https://github.com/ldc-developers/ldc/pull/661