www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Template depth switch?

reply "bearophile" <bearophileHUGS lycos.com> writes:
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
Jan 16 2014
parent reply "Kai Nacke" <kai redstar.de> writes:
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
Jan 16 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
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
Jan 16 2014
parent reply "Kai Nacke" <kai redstar.de> writes:
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
Jan 19 2014
parent reply "Kai Nacke" <kai redstar.de> writes:
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
Jul 01 2014
parent "Kai Nacke" <kai redstar.de> writes:
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
Jul 01 2014