Bug 38435

Summary: bug or no bug ?!
Product: gcc Reporter: Val <cv.schmitt>
Component: cAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED INVALID    
Severity: trivial CC: gcc-bugs, gcc-bugzilla
Priority: P3    
Version: 4.3.2   
Target Milestone: ---   
Host: gcc-4.3.2 Target: all
Build: all Known to work:
Known to fail: Last reconfirmed:

Description Val 2008-12-07 15:15:18 UTC
It is following little loop:

-----------------------------

#include<stdio.h>
#include<stdbool.h>

int m,a,n;              /* m and n are reserved for later; a is for counting */

int main(void)
{
for (a=0;a<=32;a++)
{
man=true;
}

return(0);


}

--------------------------

Now, the thing is, this loop is wrong, because of 'man=true;'
it is ending in a neverending-loop.

This concerns every loop ( if, switch, do ... until, etc.) in C ...

Is there no algorithm, which can do it, that 'man=true'
is not ending in a neverending loop ???

'a' in 'man' should count - m and n are reserved for else calculations.
every counting step should be set as 'true'. Why does this not work ???

For feedback thank you.
greetings
Val.
Comment 1 Steven Bosscher 2008-12-07 15:28:55 UTC
Learn C, then try again.