[Issue 6504] Regression(2.041): "str" ~ [arr] allows string literal to be modified

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 2 04:47:33 PST 2012


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|nobody at puremagic.com        |clugdbug at yahoo.com.au


--- Comment #5 from Don <clugdbug at yahoo.com.au> 2012-02-02 04:47:30 PST ---
(In reply to comment #4)
> I found out it causes the seg fault after posting last night. I don't quite
> understand your suggestion. Do you have a fix that can be pulled?

I thought there was an existing pull request, but I was wrong (the closed
pull457 is what I was thinking of, it's closely related but a little
different).
> 
> I did try just not constant folding "string"~['c'] and letting that be done at
> runtime, but that caused interpret3.d to fail, as it relies on the constant
> folder to do that.
> 
> So I think that can work if you enhance CTFE to handle the "string"~['c'] case.

Yes, I think that I need to create CTFE-specific appender code anyway. It's the
only case left where CTFE makes useless copies of array literals.
I will work on it tonight.

-- 
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