Yes, that its odd. It's truly not a constant expression since i
changes in the loop. So this would appear to be a problem with VS2005. For what it's worth, VS2008 does exactly the same thing.
Strangely enough, a project with just this in it does not complain so it may well be some weird edge-case problem with Microsoft's warning generation code:
#define MAX_BITS 15
int values_per_bitlen[ MAX_BITS + 1 ];
int main(int argc, char* argv[]) {
for ( int i = 0; i <= MAX_BITS; ++i )
values_per_bitlen[ i ] = 0;
return 0;
}
However, you haven't actually asked a question. What is it that you want to know, or want us to do?
Update:
See "Windows programmer"'s answer for the actual cause - there's a "#define for if (false) {} else for"
at the top of LightZ.cpp which is causing the problem.