[Issue 2761] New: Unreachable statement warning in std.string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 25 04:05:47 PDT 2009


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

           Summary: Unreachable statement warning in std.string
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: aldacron at gmail.com


Given the following as unr.d:
====================
import std.string;

void main()
{
        string s1 = "foo";
        string s2 = "Foo";
        int ret = s1.icmp(s2);
}

====================

compile with DMD 2.026 (which is not in the dropdown list to select for this
issue) as:

dmd -w -inline unr.d

Result:

warning - phobos\std\strting.d(202) Error: statement is not reachable

Does not occur with 1.041 or 2.025. Tested only on Windows.


-- 



More information about the Digitalmars-d-bugs mailing list