[Issue 1822] New: String slicing in 64-bit gdc causes spurious warnings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Feb 8 17:34:36 PST 2008


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

           Summary: String slicing in 64-bit gdc causes spurious warnings
           Product: DGCC aka GDC
           Version: 0.24
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: david at acz.org


The warning does not occur with dmd or 32-bit gdc.

wconv.d:
import std.string;

void main()
{
    auto s = "hello world";
    auto pos = s.find(' ');
    auto hello = s[0 .. pos];
}

$ gdmd -w wconv
warning - wconv.d:7: Error: implicit conversion of expression (pos) of type
long to ulong can cause loss of data


-- 



More information about the D.gnu mailing list