dmd thrashes fedora

Timon Gehr timon.gehr at gmx.ch
Sat Feb 11 08:33:45 PST 2012


On 02/11/2012 05:19 PM, Manfred Nowak wrote:
> Timon Gehr wrote:
>
>> This would make it a Phobos bug.
>
> Not necassarily.

You didn't quote everything that is relevant:

Timon Gehr wrote:
> Probably not, but the error message suggests the problem might be in
> std.functional. This would make it a Phobos bug.

Yes, necessarily.


> But it would be a Phobos bug if the allocation cycle
> is completely located within Phobos and the possibilty of such a cycle
> is not mentioned in the docs.
>

Exactly.

> An analog argument holds for every templated "library", that uses
> templates out of phobos. But how can one know, whther the extension of
> phobos with a self generated template builds a finite or semi-finite
> allocation-loop or execution-loop?
>

The error message says

Error: template instance 
std.functional.binaryFunImpl!(pred,parm1Name,parm2Name).Body!(dchar,string) 
recursive expansion

Compare to:

template T1(int x){
     alias T1!(x+1) T1;
}

template T2(int x){
     alias T1!x T2;
}

void main(){
     mixin T2!0;
}

Error: template instance tt.T1!(500) recursive expansion

I'll attempt to analyse what is going on in detail tonight.



More information about the Digitalmars-d-learn mailing list