Date: Wed, 18 Jul 2001 13:13:55 -0400 Message-Id: <200107181713.NAA09894@envy.delorie.com> X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <5BF60CD649EDD411A04600B0D049F53AFFA913 AT hydmail02 DOT hyd DOT wilco-int DOT com> (message from Prashant Ramachandra on Wed, 18 Jul 2001 21:41:11 +0530) Subject: Re: [OT] About const int References: <5BF60CD649EDD411A04600B0D049F53AFFA913 AT hydmail02 DOT hyd DOT wilco-int DOT com> Reply-To: djgpp AT delorie DOT com > "Constant is 10. It is actually 1" > > Shouldn't gcc not make the assumption that the value of j *is* 10 and > instead reference itfrom memory instead. GCC is correct. You lied to it about j being constant, so the fault is yours.