Bug 1822 – String slicing in 64-bit gdc causes spurious warnings

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-02-08T19:34:00Z
Last change time
2015-06-09T05:14:56Z
Keywords
diagnostic
Assigned to
ibuclaw
Creator
david

Comments

Comment #0 by david — 2008-02-08T19:34:35Z
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
Comment #1 by ibuclaw — 2010-09-01T11:25:29Z
Fixed in hg commit 232 / release 0.25.