digitalmars.D.bugs - [Issue 11863] New: std.conv.to!string(int/uint, radix) returns incorrect string
- d-bugmail puremagic.com (39/39) Jan 03 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (29/29) Jan 03 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (7/7) Jan 04 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (12/14) Jan 05 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (12/25) Jan 05 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (10/10) Jan 06 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (12/12) Jan 07 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
- d-bugmail puremagic.com (11/11) Jan 07 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11863
https://d.puremagic.com/issues/show_bug.cgi?id=11863 Summary: std.conv.to!string(int/uint, radix) returns incorrect string Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: electrolysis.jp+d gmail.com --- import std.conv, std.stdio; void main(){ /// int static assert(to!string(15, 10) == "15"); // success // assert(to!string(15, 10) == "15"); // failure assert(to!wstring(15, 10) == "15"w); // success assert(to!dstring(15, 10) == "15"d); // success writeln(to!string(15, 10)); // ?? /// uint static assert(to!string(15u, 10) == "15"); // success // assert(to!string(15u, 10) == "15"); // failure assert(to!wstring(15u, 10) == "15"w); // success assert(to!dstring(15u, 10) == "15"d); // success writeln(to!string(15u, 10)); // ?? /// long static assert(to!string(15L, 10) == "15"); // success assert(to!string(15L, 10) == "15"); // success } In the case of "(r)dmd foo.d", only to!string(int, radix) and to!string(uint, radix) return "0" at run time with any radix though "15" is returned when compiled with "-debug". Environment: DMD 2.064.2 on Win7 SP1 32-bit -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 03 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863 monarchdodra gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra gmail.com Component|Phobos |DMD Platform|x86 |All OS/Version|Windows |All Severity|normal |regression I did some investigating, and the Phobos code is legit. Duplicating the function, while leaving it where it is, does not reproduce the issue. Furthermore, older versions of DMD do not reproduce this issue either. It makes me think that ctfe instantiation is causing something weird later for runtime. I did a bissect, and hit this commit: 12bb9afb753ad2f2aef65550b960357c63854cbc is the first bad commit commit 12bb9afb753ad2f2aef65550b960357c63854cbc Author: Walter Bright <walter walterbright.com> Date: Wed Sep 11 14:33:14 2013 -0700 fix Issue 10441 - Static libraries too big :040000 040000 00ef3e43d4274d2e24514810353fead7bbcdaee9 313550fcc47de2b124d69f05bce5f94586bc2b01 M src :040000 040000 13dbdadb43e009e4e10041a161e1c825110f8028 7bcbc44d497d9056603b0863d781b894ff49b4ab M test Seems to be related. I think. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 03 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863 Hmm, with "-allinst" switch, OP code runs successfully in Windows (Both -m32 and -m64). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 04 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863Hmm, with "-allinst" switch, OP code runs successfully in Windows (Both -m32 and -m64).I *thought* I had tried that, but I must have gotten it wrong. I can confirm it works too for linux64. So... is this an actual bug? http://d.puremagic.com/issues/show_bug.cgi?id=11284 Seems to indicate the problem would come from a "build irregularity"? Does this mean there is a Phobos build irregularity? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 05 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863Hmm, with "-allinst" switch, OP code runs successfully in Windows (Both -m32 and -m64).Instead of "-allinst", "-release" also suppresses the error.I'm not sure, but essentially I think "build irregularity" should not be there. If it exists, it is a fault of separate compilation feature. Current template instantiation strategy is fragile. Walter's implementation is often does not fully cover target cases when it is introduced... -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------Hmm, with "-allinst" switch, OP code runs successfully in Windows (Both -m32 and -m64).I *thought* I had tried that, but I must have gotten it wrong. I can confirm it works too for linux64. So... is this an actual bug? http://d.puremagic.com/issues/show_bug.cgi?id=11284 Seems to indicate the problem would come from a "build irregularity"? Does this mean there is a Phobos build irregularity?
Jan 05 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, wrong-code https://github.com/D-Programming-Language/dmd/pull/3069 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 06 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863 Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4c846a263a7e94c0966ef66a0e0fc4adda58c737 fix Issue 11863 - std.conv.to!string(int/uint, radix) returns incorrect string https://github.com/D-Programming-Language/dmd/commit/6090f4599b4da0a642796c1d2655a26f0ce99b17 [REG2.064] Issue 11863 - std.conv.to!string(int/uint, radix) returns incorrect string -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 07 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11863 monarchdodra gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Resolved. Thanks a lot Kenji! -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 07 2014