#12 empty while and for loop dont work

closed-works-for-me
nobody
None
5
2011-11-15
2004-04-10
raghu
No

hello,
the following stmts wont work

for(;;){}
and while(1) {}

It took 3 hours to catch the bug.

Pl fix it.

Discussion

  • Martin v. Löwis

    Logged In: YES
    user_id=21627

    What do you mean "dont work". I'm compiling the program

    int main()
    {
    for(;;){}
    }

    with gcc 2.95.2, and get

    ; GCC For the Hitachi H8/300
    ; By Hitachi America Ltd and Cygnus Support
    ; release F-1
    ; -O2

    .file "a.c"
    .section .text
    .align 1
    .global _main
    _main:
    push r6
    mov.w r7,r6
    .L5:
    bra .L5
    .end

    That looks right to me.

     
  • mesheets

    mesheets - 2011-11-15
    • status: open --> closed-works-for-me
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks