http://d.puremagic.com/issues/show_bug.cgi?id=7872
bearophile_h...@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_h...@eml.cc --- Comment #1 from bearophile_h...@eml.cc 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: -------