Hidden module c'tors/d'tors?

Steven Schveighoffer schveiguy at yahoo.com
Mon Aug 15 14:41:48 PDT 2011


On Mon, 15 Aug 2011 17:04:07 -0400, dsimcha <dsimcha at yahoo.com> wrote:

> I'm getting annoying runtime errors about "Cycle detected between  
> modules with
> ctors/dtors" in a large program that doesn't have any module  
> c'tors/d'tors, at
> least not explicitly.  (i.e. there's no static this or static ~this in  
> the
> whole project, not counting the libs it imports).  Is there any way a  
> module
> c'tor/d'tor could be hidden, such that there is one even if there's no  
> actual
> static this statement?

 From what I understand of how the compiler works, such ctor/dtors are put  
into compiler-generated modules marked as "standalone", meaning they  
should be ignored in terms of cycle detection (even though they *do* have  
ctor/dtors).

Do you have an example? It may be a bug in the compiler/cycle detection  
algorithm.

-Steve


More information about the Digitalmars-d mailing list