digitalmars.D.bugs - warning bug - infinite loops
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (8/26) Mar 14 2005 warning - warnloop.d(1): function warnloop.main no return at end of func...
The code analyzer doesn't follow returns, issued within the loops: warnloop.d:int main() { for (;;) return 0; }warning - warnloop.d(1): function warnloop.main no return at end of function The workaround at the moment is to insert an assertion:int main() { for (;;) return 0; assert(0); }When assertions are skipped over (later on), this becomes:int main() { for (;;) return 0; assert(0); return 0; }However, at the moment this gives another warning: warning - warnloop.d(6): statement is not reachable --anders
Mar 14 2005