Bug 38435 - bug or no bug ?!
Summary: bug or no bug ?!
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.3.2
: P3 trivial
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-07 15:15 UTC by Val
Modified: 2008-12-07 15:28 UTC (History)
2 users (show)

See Also:
Host: gcc-4.3.2
Target: all
Build: all
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.