This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

int initialization bug ?


Does gcc v2.8.1 have a problem initialzing an int within a for loop in the
following way? :

for(int k=0;k<255;k++)
{
   ....
}

for(int m=0;m<k;m++)
{
 ..
}

The above code just fails to execute the second loop at all and gives me a
warning about obsolete binding or something like that !  If I declare the
int's separately outside the loop arguments then everything works great !

Any ideas if this is a bug in GCC ?

TIA,

Regards,
PDC



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]