[Issue 2463] No line number in "statement is not reachable" warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 24 16:27:27 PST 2009


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


Witold Baryluk <baryluk at smp.if.uj.edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |baryluk at smp.if.uj.edu.pl


--- Comment #2 from Witold Baryluk <baryluk at smp.if.uj.edu.pl> 2009-11-24 16:27:27 PST ---
It also hapens in more complicated situations. Out of curriosity I added -w to
my project, and found few this "warning - Error: statment is not reachble"
statments, and compilation failed. I have no idea where the problem is exactly,
because this is big projects, with many templates.

What is interesting for some of this warning i have lines numbers like:

warning - corod.d(389): Error: statement is not reachable

but for most:

warning - Error: statement is not reachable

And i can't find good rule when I have line number and when i don't.

Small example:


$ dmd2 -w A.d 
warning - Error: statement is not reachable

=== A.d ====
class A {
    void f() {
        while (true) {}
        return 0;
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list