Bug 3412 – DMD 1.x svn branch store string literal in mutable char*

Status
RESOLVED
Resolution
INVALID
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2009-10-17T10:46:00Z
Last change time
2014-04-18T09:12:04Z
Keywords
patch
Assigned to
nobody
Creator
leandro.lucarella

Attachments

IDFilenameSummaryContent-TypeSize
4760002-Store-string-literals-in-const-char-variables.patchPatch against DMD 1.x branch r215text/plain3901

Comments

Comment #0 by leandro.lucarella — 2009-10-17T10:46:49Z
Created attachment 476 Patch against DMD 1.x branch r215 String literals are supposed to be const char* instead of mutable char*, but DMD uses char* in a few places. Attached is a patch that stores the string literals using the right type. As a side effect, it avoids some compiler warnings (at least with GCC).
Comment #1 by leandro.lucarella — 2009-10-17T11:49:06Z
I forgot to mention that you can apply the patch with: patch -p2 < 0002-Store-string-literals-in-const-char-variables.patch in the src directory
Comment #2 by leandro.lucarella — 2013-03-28T07:23:26Z
I think this is extremely outdated and eventually was (at least partially) addressed, so better to let it die.