www.digitalmars.com         C & C++   DMDScript  

D - Code generation problem

reply "Matthew Wilson" <dmd synesis.com.au> writes:
Walter

It's a bit hard to give you a simple example, but I'm getting bad code
generated in nested for loops. Basically if I assign (not declare!)
variables within the inner for-loop they don't get assigned, e.g.

 for(i = 0; i < ... )
 {
  for(x = 0; x < ... )  // x does not get set to 0
  {
  }
 }

Naturally I'll try and distill a simple example, but I wanted to flag it,
even if it's just to learn that this is a known issue.

Matthew
Mar 19 2003
parent "Walter" <walter digitalmars.com> writes:
"Matthew Wilson" <dmd synesis.com.au> wrote in message
news:b59p3k$2io5$1 digitaldaemon.com...
 It's a bit hard to give you a simple example, but I'm getting bad code
 generated in nested for loops. Basically if I assign (not declare!)
 variables within the inner for-loop they don't get assigned, e.g.

  for(i = 0; i < ... )
  {
   for(x = 0; x < ... )  // x does not get set to 0
   {
   }
  }

 Naturally I'll try and distill a simple example, but I wanted to flag it,
 even if it's just to learn that this is a known issue.

It's not a known issue. Let me know what you find.
Mar 22 2003