www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3412] New: DMD 1.x svn branch store string literal in mutable char*

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3412

           Summary: DMD 1.x svn branch store string literal in mutable
                    char*
           Product: D
           Version: 1.051
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: llucax gmail.com


--- Comment #0 from Leandro Lucarella <llucax gmail.com> 2009-10-17 10:46:49
PDT ---
Created an attachment (id=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).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 17 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3412



--- Comment #1 from Leandro Lucarella <llucax gmail.com> 2009-10-17 11:49:06
PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 17 2009