[Issue 224] Incorrect warning "no return at end of function"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 25 14:22:00 PDT 2006


http://d.puremagic.com/issues/show_bug.cgi?id=224





------- Comment #1 from jarrett.billingsley at gmail.com  2006-06-25 16:21 -------
With the simplistic flow analysis in D (read: virtually none), it can't tell
that the conditional is always taken.  That if statement might not be optimized
out until after the function "flow analysis" is done.  Which is why this is a
warning and not an error, or else it'd probably give the same warning for half
the functions that you write.  All it checks for is if the last statement of
the function is a return, and in this case, it isn't.


-- 




More information about the Digitalmars-d-bugs mailing list