#370 For loop descrease forever!!

closed-rejected
5
2013-05-25
2002-08-20
Liwei Chou
No

unsigned char i;
for( i=9 ; i>=0 ; i-- )
{
(i==255) /*This can be true!*/
}

This is really a very serious bug!!

Discussion

  • Nick Craig-Wood

    Nick Craig-Wood - 2002-08-20

    Logged In: YES
    user_id=220462

    An unsigned char is always >= 0.

    A compiler warning would be nice here, but I'm afraid its
    your code skyjacker!

     
  • Liwei Chou

    Liwei Chou - 2002-08-20

    Logged In: YES
    user_id=315900

    Oh~~
    I am sorry...
    Thank you guys all working with SDCC!

     
  • Liwei Chou

    Liwei Chou - 2002-08-20

    Logged In: YES
    user_id=315900

    Oh~~
    I am sorry...
    Thank you guys all working with SDCC!

     
  • Bernhard Held

    Bernhard Held - 2002-08-24
    • milestone: --> non_bugs
    • assigned_to: nobody --> bernhardheld
    • status: open --> closed-rejected
     

Log in to post a comment.