[Issue 2678] for loops are already assumed to terminate

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2678

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|unspecified |D2

--


[Issue 2678] for loops are already assumed to terminate

2009-03-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678


bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #7 from bugzi...@digitalmars.com  2009-03-11 14:54 ---
Fixed dmd 1.041 and 2.026


-- 



[Issue 2678] for loops are already assumed to terminate

2009-03-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678


s...@iname.com changed:

   What|Removed |Added

 CC||s...@iname.com




--- Comment #6 from s...@iname.com  2009-03-06 14:56 ---
That should equally generate an unreachable code warning.


-- 



[Issue 2678] for loops are already assumed to terminate

2009-03-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678





--- Comment #5 from bary...@smp.if.uj.edu.pl  2009-03-05 16:56 ---
How about assert(0); at the end?


-- 



[Issue 2678] for loops are already assumed to terminate

2009-03-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678





--- Comment #4 from clugd...@yahoo.com.au  2009-03-03 07:49 ---
This also applies to:
while(1) {...}

But I notice that Walter's already fixed that .


-- 



[Issue 2678] for loops are already assumed to terminate

2009-02-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678





--- Comment #3 from and...@metalanguage.com  2009-02-20 11:27 ---
(In reply to comment #2)
> You would also need to take into account try/catch blocks. This doesn't
> actually invalidate the assertion (you still can't fall out of the loop), it
> just forces you to be more careful how you read it (you /can/ end up running
> the next line of code after the loop if it is in a catch block) 
> 

Yah, and goto is to be handled as well. I'm just saying the loop will never
naturally fall off its end.


-- 



[Issue 2678] for loops are already assumed to terminate

2009-02-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678





--- Comment #2 from shro8...@vandals.uidaho.edu  2009-02-20 10:52 ---
You would also need to take into account try/catch blocks. This doesn't
actually invalidate the assertion (you still can't fall out of the loop), it
just forces you to be more careful how you read it (you /can/ end up running
the next line of code after the loop if it is in a catch block) 


-- 



[Issue 2678] for loops are already assumed to terminate

2009-02-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2678





--- Comment #1 from and...@metalanguage.com  2009-02-20 09:17 ---
> Before anyone brings up Turing completeness: I said "nonzero
> compile-time-constant termination condition".

s/Turing completeness/Turing's machine halting problem/


--