any tool to at least partially convert C++ to D (htod for source

Ellery Newcomer ellery-newcomer at utulsa.edu
Wed Mar 10 10:39:03 PST 2010


On 03/10/2010 12:14 PM, Walter Bright wrote:
> Jacob Carlborg wrote:
>> I've always wonder why that is. I mean if I put an empty static
>> constructor in two modules and they import each other I get a circular
>> reference error. Usually when I use static constructors they don't
>> depend on the order of each other. Can't this be fixed if the static
>> constructors don't depend on each other?
>
>
> I don't know if there's a reasonable way of determining if they depend
> on each other, so dmd assumes they do.

Maybe do a bit of analysis that can tell whether any static ctors in a 
module use symbols from any other module and use that to determine 
module dependencies? It wouldn't fix the problem completely, but it 
would make it a bit more fine grained, and would probably remove 90% of 
the false positives.



More information about the Digitalmars-d mailing list