digitalmars.D.bugs - [Issue 1591] New: 2.006 breaks writef("%s", str) where str is a string
- d-bugmail puremagic.com (24/24) Oct 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (20/20) Oct 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (6/6) Oct 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (13/13) Oct 17 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (6/6) Oct 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (10/10) Oct 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (6/6) Oct 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1591
- d-bugmail puremagic.com (9/9) Jan 21 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1591
http://d.puremagic.com/issues/show_bug.cgi?id=1591 Summary: 2.006 breaks writef("%s", str) where str is a string Product: D Version: 2.006 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: bugzilla digitalmars.com ReportedBy: jemandy earthlink.net 2.006 breaks the following program: import std.stdio; void main() { // char[] str = cast(char[])("hello, world"); string str = cast(string)("hello, world"); writefln("%s", str); // Breaks in 2.006 } This does not compile with either definition of str, the definition out version or the active definition. (Note, the cast is needed for the char[] definition of str, but not the string definition of str). --
Oct 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 ------- Comment #1 from ddparnell bigpond.com 2007-10-17 20:45 ------- This does NOT fail for me when using dmd 2.006 (Windows XP) ---- c:\temp>type test.d import std.stdio; void main() { string str = "hello, world"; writefln("%s", str); } c:\temp>dmd test.d y:\dmd\bin\..\..\dm\bin\link.exe test,,,user32+kernel32/noi; c:\temp>test hello, world c:\temp>dmd Digital Mars D Compiler v2.006 Copyright (c) 1999-2007 by Digital Mars written by Walter Bright ---- --
Oct 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 ------- Comment #2 from jemandy earthlink.net 2007-10-17 22:31 ------- Oops, I had warnings enabled. (I compile from a batch file and had forgotten that I did this. I should have read the error message more carefully.) Try again with dmd -w test.d. --
Oct 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 ------- Comment #3 from ddparnell bigpond.com 2007-10-17 22:43 ------- Ok, now it fails. You could have inserted the error message into your original report to speed up problem determination. ---- c:\temp>dmd -w test warning - y:\dmd\bin\..\src\phobos\std\format.d(2019): Error: statement is not reachable y:\dmd\bin\..\src\phobos\std\format.d(2087): template instance std.format.getNthInt!(invariant(char)[],char) error instantiating ---- (P.S. I've had to turn off -w because of problems with std.stream). --
Oct 17 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 andrei metalanguage.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --
Oct 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 andrei metalanguage.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bugzilla digitalmars.com |andrei metalanguage.com Status|ASSIGNED |NEW ------- Comment #4 from andrei metalanguage.com 2007-10-19 12:55 ------- Fixed; the fix will go into the next minor release, when the bug will be closed. Thanks! --
Oct 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 andrei metalanguage.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --
Oct 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1591 jemandy earthlink.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #5 from jemandy earthlink.net 2008-01-21 12:25 ------- Andrei's fix worked. --
Jan 21 2008