
1 Nov
2005
1 Nov
'05
11:30 a.m.
* John Meacham:
loop:
if () goto loop;
is not equivalent to a do-while loop, loop invarients cannot be hoisted out of the above for instance (except in some cases... it is all quite tricky and we want gcc to have as much freedom as possible).
do-while loops are converted to this form by the compiler (as of version 4, use the -fdump-tree-* to see the IL), so the problems you are observing must be caused by something different.
use C control constructs rather than gotos.
With GCC version 4, this will have no effect because the gimplifier converts everything to goto-style anyway.