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


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #1 from [email protected] 2012-04-09 09:36:00 PDT ---
(In reply to comment #0)
> string foo = "john";
> printf("hello %s\n", foo);
> 
> doesn't work because `printf` expects a zero-terminated string.
> 
> The compiler should really yield a warning here.

In D string literals are zero-terminated. So this run correctly:

import core.stdc.stdio;
void main() {
    string foo = "john";
    printf("hello %s\n", foo.ptr);
}

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

Reply via email to