the code: void foo() { int i; for (i = 0; i <= 0x7fffffff; i++) ; } compiled with "-O -S" procudes the following assembly. foo: pushl %ebp movl %esp, %ebp .L2: jmp .L2
-- Summary: Infinite loop with ranged for() loop Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sa2c at sa2c dot net CC: gcc-bugs at gcc dot gnu dot org,sa2c at sa2c dot net GCC build triplet: i386-unknown-freebsd5.3 GCC host triplet: i386-unknown-freebsd5.3 GCC target triplet: i386-unknown-freebsd5.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18700