"Ioannis Vranos" <iv*@guesswh.at.grad.com> wrote in message
news:1098012253.879248@athnrd02...
<snip>
However in the OP compiler it does, as even his simpler code with two
loops refused to compile.
I know all that, but my point was that you need /Za or /Zc:forScope to get
standards-compliant behaviour in for-loop scope. Even if VC7.1 compiles the
OP's code without those options, it's still not standards-compliant
behaviour because 'i' is still visible outside of the loops.
The OP is obviously using VC6 or older, because those are the only versions
of VC that fail for his code. Nevertheless, even though VC7+ don't fail on
that code, their behaviour is still not fully standards-compliant *unless*
you specify one of those options. That is what I was trying to say. I wasn't
trying to refute the fact that VC7+ would fix the OPs situation.
VC8 is still the same btw. IMO it should be the reverse though,
standards-compliant behaviour by default and non-standards compliant
behaviour with an option. Maybe I'll file a suggestion on that.
--
Unforgiven