order of static constructor execution

Regan Heath regan at netmail.co.nz
Mon Mar 15 11:37:13 PDT 2010


Walter Bright wrote:
> Regan Heath wrote:
>> Walter Bright wrote:
>>> Regan Heath wrote:
>>>> I expect this either isn't possible or falls into the 'possible up 
>>>> to a point' category.
>>>
>>>
>>> It's possible up to a point, that point being the parts of the 
>>> program the compiler does not see.
>>
>> So.. isn't that the same point the current import dependency method 
>> stops at?
> 
> No, because that's a runtime check.

No, I'm no longer suggesting a runtime solution.

How does 'unreachable code' detection in C/C++ compilers work?  Can you 
use something similar to figure out the order module static data is used?

R



More information about the Digitalmars-d mailing list