www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11066] New: Spurious warning when profiling codes using toLower()

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11066

           Summary: Spurious warning when profiling codes using toLower()
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kekeniro2 yahoo.co.jp


--- Comment #0 from kekeniro2 yahoo.co.jp 2013-09-18 20:19:31 PDT ---
The code below gives an wrong warning.
This is a regression introduced in 2.063.
However, without -w option it works, so this may be a minor issue.


COMMAND:
dmd -profile -w

CODE:
import std.string;
void main() {
    auto s = toLower("");
}

OUTPUT:
Warning: statement is not reachable
// Note: It doesn't show its location.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 18 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11066



--- Comment #1 from kekeniro2 yahoo.co.jp 2013-09-18 20:25:12 PDT ---
Reduced test case is here:

void main() {
    string s;
    foreach (dchar c; s) // affected by dchar
        return;
}

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