www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2761] New: Unreachable statement warning in std.string

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: aldacron 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.


-- 
Mar 25 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2761


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 2.027


-- 
Apr 01 2009