stops compiling

Deewiant deewiant.doesnotlike.spam at gmail.com
Mon Mar 20 22:29:39 PST 2006


Thomas Kuehne wrote:
> debugger schrieb am 2006-03-19:
>>> dmd 0.149,Win stops compiling without messsage if number of statements is too
>>> large.
>>>
>>> void init1(){}
>>> void init2(){
>>> init1();
>>> // ... 16,000 times -> stops 
>>> //     only 8,000 times -> compiles
>>> init1();
>>> }
>>> void init3(){}
>>>
>>> The effect can be seen with the -v option, because init4 does not get code
>>> generated
> 
> I can't reproduce this. Are you sure the code above is complete
> (I see no "init4")?
> 
> Thomas
> 
> 

I think he typoed and was talking about init3, as that's the behaviour I get. I
used code like this:

void init1(){}
void init2(){
// around 16 000 calls to init1()
}
void init3(){ printf("hello"); }
void main() { init3(); }

And nothing was printed when I ran the program - in fact, -v claimed that even
main() had no code generated.

Approximately halving the number of calls to init1() (I wasn't counting how
many, just going by his approximate 16 and 8 thousand) made it work fine.



More information about the Digitalmars-d-bugs mailing list