[Issue 4298] Constant array translated to unnecessary array literal creation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 15 15:15:17 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4298
Shin Fujishiro <rsinfu at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|patch |
--- Comment #2 from Shin Fujishiro <rsinfu at gmail.com> 2010-06-15 15:15:15 PDT ---
(In reply to comment #1)
With the patch in comment #1, this example does not link:
--------------------
void main()
{
immutable s = "abc";
auto t = s[0 .. $ - 1];
}
--------------------
% dmd -run test
test.o(.text._Dmain+0x1a): In function `_Dmain':
: undefined reference to `_D4test4mainFZv8__dollarxk'
--------------------
The link error does not occur if the dollar $ is replaced with s.length.
The real cause of the link error may be elsewhere (only $ causes a link
error?), but the patch itself doesn't work anyway. So I remove the 'patch'
keyword.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list