DMD 1.004 release
    Lionello Lunesu 
    lionello at lunesu.remove.com
       
    Sat Jan 27 23:32:40 PST 2007
    
    
  
"Walter Bright" <newshound at digitalmars.com> wrote in message 
news:epgokh$2q2p$1 at digitaldaemon.com...
> Jordan Miner wrote:
>> Here is a problem I've found in post-1.00 versions.
>
> What's happening is you're writing into the string literal, which is not 
> allowed. String literals should be regarded as readonly.
>
> Post-1.00 versions combine identical string literals, which is why you see 
> the error.
Shouldn't string literals be forced "const"? Even D's limited const could do 
that. To create a mutable copy you'd be forced to used .dup.
const char[] either = "asdfsadf";
char[] or = "asdfsd".dup;
L. 
    
    
More information about the Digitalmars-d-announce
mailing list