Here is the code given below. My question is that will it compile with assertions enabled.In my view it should not since statement //1 will be unreachable if asssertions are enabled. I tried to compile with assertions enabled and it compiled fine. But i am not able to undestand why.
[ August 03, 2005: Message edited by: Barry Gaunt ]
So you believe this should not compile with assertions enabled. Not an unreasonable assumption but that's never the case. Compile time expression values can only produce unreachable code in while, for and do statements. That way you can say if(SKIP_FLAG) ... and not have it compile in one state and not in the other. Not particularly orthogonal but useful nevertheless.